/warrant not working
#1

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.
Reply
#2

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)