10.12.2015, 15:15
I get this
Код:
C:\Users\Nate\Desktop\Scract rp\gamemodes\rp(6060) : error 029: invalid expression, assumed zero C:\Users\Nate\Desktop\Scract rp\gamemodes\rp6065) : warning 225: unreachable code
PHP код:
CMD:tazer(playerid, params[])
{
new
string[128];
if(IsACop(playerid))
if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_LIGHTRED, "[SERVER]: You can't do this while you're in a vehicle.");
if(isAlive[playerid] > 0) return SCM(playerid, COLOR_LIGHTRED, "[SERVER]: You can't do this while Dead!");
if(pTazer{playerid} == 0)
{
pTazerReplace{playerid} = PlayerInfo[playerid][pWeapon1];
//if(PlayerInfo[playerid][pWeapon1][2] != 0) RemovePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon1][2]);
format(string, sizeof(string), "* %s unholsters their tazer.", GetName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 23, 100);
pTazer{playerid} = 1;
}
else
{
RemovePlayerWeapon(playerid, 23);
GivePlayerWeapon(playerid, pTazerReplace{playerid}, 100);
format(string, sizeof(string), "* %s holsters their tazer.", GetName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
pTazer{playerid} = 0;
}
else line 6060
{
SCM(playerid, COLOR_LIGHTRED, "[SERVER]: You are not a Cop!");
return 1;
}
return 1; line 6065
}