20.01.2010, 14:42
Same with strings too,
It all started when i added this command,
Im new to ZCMD so i might of done something wrong,
It all started when i added this command,
Im new to ZCMD so i might of done something wrong,
pawn Код:
CMD:arrest(playerid, params[]_
{
if (!sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "Usage: /arrest [Playerid/PartOfName]");
if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "Player not found");
if (gTeam[playerid] != TEAM_CROOKSF) return SendClientMessage(playerid, COLOR_RED, "You are not a police officer");
if (id == playerid) return SendClientMessage(playerid, COLOR_RED, "You cannot use this command on yourself");
if (gTeam[id] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED, "You cannot arrest a police officer");
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Police Officer %s has arrested you.", name);
SendClientMessage(id, COLOR_WHITE, string);
SetTimerEx("ArrestTimer", 20000, 0, "i", playerid);
SetPlayerPos(id, 264.9072,77.9281,1001.0391);
GivePlayerMoney(playerid,-1);
ResetPlayerMoney(playerid);
GetPlayerName(id, name, sizeof(name));
format(string, sizeof(string), "You have arrested %s", name);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}

