27.11.2011, 14:46
Hey guys ,
This script crashing my gm..help ?
This script crashing my gm..help ?
pawn Код:
else if ( PRESSED(KEY_FIRE) )
{
if(IsACop(playerid) && GetPlayerWeapon(playerid) == 23 && Tazer[playerid] == 1)
{
new Float:X,Float:Y,Float:Z,Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid, pX,pY,pZ);
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i,60, pX,pY,pZ))
{
if(i != playerid)
{
GetPlayerPos(i, X,Y,Z);
new iname[MAX_PLAYER_NAME];
GetPlayerName(i, iname, sizeof(iname));
if(IsPlayerAimingAt(playerid, X,Y,Z,1.5))
{
GameTextForPlayer(i,"~r~BEING TAZED",9000,4);
GameTextForPlayer(playerid, "~b~USING THE TAZER",2000,4);
TogglePlayerControllable(i, 0);
TogglePlayerControllable(playerid, 0);
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
SetTimerEx("Unfreezeply",9000,0,"i",i);
ApplyAnimation(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1);
SetTimerEx("Unfreezeply",1500,0,"i",playerid);
format(string, sizeof(string),"* %s Aims his Tazer at %s and Shoots it",sendername,iname);
}
else return GameTextForPlayer(playerid, "~b~Missed the Shoot",3750,4);
}
}
}
}
}