25.03.2013, 13:09
pawn Код:
if(strcmp(cmd, "/tazer", true) ==0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
if(GetPVarInt(playerid, "HasTazer") == 0) {
SetPVarInt(playerid, "HasTazer", 1);
GivePlayerWeapon(playerid, 23, 65500);
format(string, sizeof(string), "* %s unholsters his tazer", Account[playerid][pName]);
ProxDetector(15.0,playerid,string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else
{
DeletePVar(playerid, "HasTazer");
SetPlayerAmmo(playerid, 23, 0);
format(string, sizeof(string), "* %s holsters his tazer", Account[playerid][pName]);
ProxDetector(15.0,playerid,string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
}
}
return 1;
}
