#1

hey guys i making aduty command i get to there no errors but when i in game i rcon login type /aduty this work but when i type /aduty to off it say lik on
Код:
CMD:aduty(playerid,params[])
  {
      if(IsPlayerAdmin(playerid) < 1) return SendClientMessage(playerid, 0x33AA33AA, "[BA:RP]Niste ovlasceni da koristite ovu komandu!");
	    {
		  if(sscanf(params, "u")) return SendClientMessage(playerid, 0x33AA33AA, "[BA:RP]Koristi /aduty");
			 new name[ MAX_PLAYER_NAME];
                 GetPlayerName( playerid, name , MAX_PLAYER_NAME );
				   new string[45];
					  format(string, sizeof(string), " [BA:RP]Admin %s je na duznosti!",name);
						  SendClientMessageToAll(0x33AA33AA, string);
						}
					  return 1;
					 }
what to do next
Reply
#2

wtf is this ?

please ident your code
Reply
#3

Create a player variable and set it to 1 when the player issues the command, then, before the functions, check if the player has that variable in 1, if so, set it to zero, send your 'not duty' message and apply a return.
Reply
#4

to put IsPlayerDuty == 0? Or
Reply
#5

https://sampwiki.blast.hk/wiki/SetPVarInt
https://sampwiki.blast.hk/wiki/GetPVarInt

https://sampwiki.blast.hk/wiki/Control_Structures#if

That's all you need.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)