21.05.2009, 22:08
pawn Код:
if (strcmp(cmd, "/suspect", true) == 0)
{
if(gTeam[playerid] != TEAM_COPS)
{
tmp = strtok(cmdtext, index);
if(strlen(tmp))
{
id = strval(tmp);
if(IsPlayerConnected(id))
{
new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(playerid, name2, sizeof(name2));
format(string, sizeof(string), "-> Police Officer %s has suspected a %s", name, name2 );
SendClientMessageToAll(0xFFFF00AA, string);
SendClientMessage(id, 0xFFFF00AA, "-> You are now a police suspect, cops will try to arrest you!");
SetPlayerWantedLevel(id, 2);
return 1;
}
else return SendClientMessage(id, 0xFFFF00AA, "-> Player not found");
}
else return SendClientMessage(id, 0xFFFF00AA, "-> You mean: /suspect [PlayerID]");
}
else return SendClientMessage(id, 0xFFFF00AA, "-> You are not a Police Officer");
}
How could I add [Reason] for the command? Like /suspect [PlayerID] [Reason]