Jump to content
  • 0

Problemă la adăugarea unei funcții


Believer>

Question

Problema intalnita (descriere): Deci am creat o comandă prin care un jucător își poatea lua câteva arme ... Doar că la această comandă vreau să adaug o funcție astfel încât ca acea comandă să se poată folosi doar de două ori într-un interval de zece minute sau în cazul în care jucătorul moare înainte de împlinirea a celor 10 minute să poată refolosi iar comanda,anulându-se practic acel timp.

Ero(area / rile) / warning-(ul / urile): Nu există nici o eroare.

Liniile de cod / sursa / script-ul: 

	if(strcmp(cmd, "/takeguns", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        GetPlayerName(playerid, sendername, sizeof(sendername));
		    if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2)
	        {
                format(string, sizeof(string), "* Agent %s took some weapons!", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                SendClientMessage(playerid, COLOR_GRAD2, "You have just taken some weapons.");
		GivePlayerWeapon(playerid, 24, 100);// Deagle
        	GivePlayerWeapon(playerid, 29, 250);// MP5
	        GivePlayerWeapon(playerid, 31, 250);// M4
	        return 1;
		}
	}
	return 1;
} 

Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Nu,nu pot să spun că am încercat să adaug această funcție singur.

Edited by DeYuON.
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.