14.05.2012, 17:54
Error i get
Code:
C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(101) : warning 219: local variable "X" shadows a variable at a preceding level C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(101) : warning 219: local variable "Y" shadows a variable at a preceding level C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(101) : warning 219: local variable "Z" shadows a variable at a preceding level C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(106) : error 035: argument type mismatch (argument 2) C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(107) : warning 213: tag mismatch C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(107) : warning 213: tag mismatch C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(107) : warning 213: tag mismatch C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(120) : warning 213: tag mismatch C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(120) : warning 213: tag mismatch C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(120) : warning 213: tag mismatch C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(121) : warning 213: tag mismatch C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(121) : warning 213: tag mismatch C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(121) : warning 213: tag mismatch C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(101) : warning 203: symbol is never used: "Z" C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(101) : warning 203: symbol is never used: "Y" C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Publics/OnPlayerKeyStateChange.pwn(101) : warning 203: symbol is never used: "X"
pawn Code:
if((newkeys & KEY_FIRE) && TazerActive[playerid] == 1 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
if(TazerTimeout[playerid] > 0)
{
return 1;
}
new Float:X, Float:Y, Float:Z;
foreach(Player, i)
{
if(IsPlayerStreamedIn(i, playerid))
{
GetPlayerPos(i, X, Y, Z);
if(IsPlayerAimingAt(playerid,X,Y,Z,1) && PlayerCuffed[i] == 0 && GetPlayerState(i) == PLAYER_STATE_ONFOOT && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
{
if(AdminDuty[playerid] >= 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "You cannot tez admin when they are duty on!");
return 1;
}
new string[44 + (MAX_PLAYER_NAME * 2)];
format(string, sizeof(string), "* %s fires their tazer at %s, stunning them.", GetPlayerNameEx(playerid), GetPlayerNameEx(i));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(i, "~r~Tazed", 3500, 3);
TogglePlayerControllable(i, 0);
ApplyAnimation(i,"CRACK","crckdeth2",4.1,0,1,1,1,1,1);
PlayerPlaySound(i, 1085, X, Y, Z);
PlayerPlaySound(playerid, 1085, X, Y, Z);
PlayerCuffed[i] = 1;
SetPVarInt(i, "PlayerCuffed", 1);
SetPVarInt(i, "IsFrozen", 1);
//Frozen[i] = 1;
TazerTimeout[playerid] = 4;
SetTimerEx("TazerTimer",1000,false,"d",playerid);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~r~Tazer reloading... ~w~5", 1500,3);
return 1;