SA-MP Forums Archive
/warrant not working - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /warrant not working (/showthread.php?tid=133584)



/warrant not working - too803 - 13.03.2010

here is my script

if(strcmp(cmd, "/warrant", true) == 0) {


if (gTeam[playerid] == TEAM_COP) {
if (IsPlayerConnected(giveplayerid)) {

GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "You have been warranted by %s!", sendername, playerid);
SendClientMessage(giveplayerid, COLOR_RED1, string);
format(string, sizeof(string), "%s has been warranted by %s!", giveplayer, giveplayerid, sendername, playerid);
SendClientMessageToAll(COLOR_RED1, string);
printf(string);
SetPlayerColor(playerid, COLOR_ORANGE);
return 1;
}else{
format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}else{
format(string, sizeof(string), "You are not cop, you cannot jail.", giveplayerid);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}else{
format(string, sizeof(string), "Someone already jailed that .", giveplayerid);
SendClientMessage(playerid, COLOR_YELLOW, string);

}



When i go ingame,it shows SERVER:UNKOWN COMMAND message.


Re: /warrant not working - [HiC]TheKiller - 13.03.2010

You need
pawn Код:
return 1;
at the end of your code.


Re: /warrant not working - too803 - 13.03.2010

Quote:
Originally Posted by [HiC
TheKiller ]
You need
pawn Код:
return 1;
at the end of your code.
Every time............Ill try it out