18.03.2012, 19:18
I have problems with command tazzer
Here is error:
and Tazer cmd:
Here is error:
pawn Код:
C:\Users\home\Desktop\GFHF\gamemodes\rp1.pwn(1437) : error 017: undefined symbol "pTazer"
C:\Users\home\Desktop\GFHF\gamemodes\rp1.pwn(1437) : warning 215: expression has no effect
C:\Users\home\Desktop\GFHF\gamemodes\rp1.pwn(1437) : error 001: expected token: ";", but found "]"
C:\Users\home\Desktop\GFHF\gamemodes\rp1.pwn(1437) : error 029: invalid expression, assumed zero
C:\Users\home\Desktop\GFHF\gamemodes\rp1.pwn(1437) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
pawn Код:
CMD:tazer(playerid, params[])
{
if(PlayerInfo[playerid][pLevel] == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "You can't do this while you're in a vehicle.");
return 1;
}
if(GetPVarInt(playerid, "IsInArena") >= 0)
{
SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now, you are in a arena!");
return 1;
}
if(GetPVarInt( playerid, "EventToken") != 0)
{
SendClientMessage(playerid, COLOR_GREY, "You can't use the tazer while you're in an event.");
return 1;
}
if(PlayerCuffedTime[playerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, "You can't do this right now.");
return 1;
}
if(GetPVarInt(playerid, "Injured") == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You can't do this right now.");
return 1;
}
if(PlayerInfo[playerid][pJailed] > 0)
{
SendClientMessage(playerid, COLOR_WHITE, "You cannot use this in jail/prison.");
return 1;
}
if(PlayerCuffed[playerid] >= 1) {
SendClientMessage(playerid, COLOR_WHITE, "You cannot use this while tazed/cuffed.");
return 1;
}
if(pTazer[playerid] == 0)
{
pTazerReplace[playerid] = PlayerInfo[playerid][pGuns][2];
if(PlayerInfo[playerid][pGuns][2] != 0) RemovePlayerWeapon(playerid, PlayerInfo[playerid][pGuns][2]);
format(string, sizeof(string), "* %s unholsters their tazer.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerValidWeapon(playerid, 23, 60000);
pTazer[playerid] = 1;
}
else
{
RemovePlayerWeapon(playerid, 23);
GivePlayerValidWeapon(playerid, pTazerReplace[playerid], 60000);
format(string, sizeof(string), "* %s holsters their tazer.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
pTazer[playerid] = 0;
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not a Cop!");
return 1;
}
return 1;
}