aduty - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: aduty (
/showthread.php?tid=630853)
aduty -
IceWizz - 19.03.2017
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
Re: aduty -
TitanX - 19.03.2017
wtf is this ?
please ident your code
Re: aduty -
Toroi - 19.03.2017
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.
Re: aduty -
IceWizz - 19.03.2017
to put IsPlayerDuty == 0? Or
Re: aduty -
Toroi - 19.03.2017
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.