Error In Tazer Filterscript
#1

I Get This Error:

PHP код:
C:\Users\Immortal\Desktop\Elite Gaming 0.3.7 R-2 Server\filterscripts\tazer.pwn(5) : error 017undefined symbol "pCuffed"
C:\Users\Immortal\Desktop\Elite Gaming 0.3.7 R-2 Server\filterscripts\tazer.pwn(37) : warning 215expression has no effect
C
:\Users\Immortal\Desktop\Elite Gaming 0.3.7 R-2 Server\filterscripts\tazer.pwn(37) : error 001expected token";"but found "]"
C:\Users\Immortal\Desktop\Elite Gaming 0.3.7 R-2 Server\filterscripts\tazer.pwn(37) : error 029invalid expressionassumed zero
C
:\Users\Immortal\Desktop\Elite Gaming 0.3.7 R-2 Server\filterscripts\tazer.pwn(37) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Here Is The Filterscript:

PHP код:
/*==============================================================================
-------------------------------------Cuff--------------------------------------
==============================================================================*/
cmd(cuffplayeridparams[])
{
    new 
IDstring[20+MAX_PLAYER_NAME];
    if(
sscanf(params"u"ID)) return SendClientMessage(playeridGREY"CMD:/cuff [playerid]");
    if(
pTazed[ID] == 0) return SendClientMessage(playeridGREY"You will have to taze this player before cuffing him");
    if(
ID == playerid) return SendClientMessage(playeridGREY"You cannot cuff/uncuff your self");
    if(
pCuffed[ID] == 0)
    {
        
pCuffed[ID] = 1;
        
format(stringsizeof(string), "%s has been cuffed by %s."RemoveUnderScore(ID),RemoveUnderScore(playerid));
        
cufftimer[ID] = SetTimerEx("UnCuff"5000000"d"ID);
        
ProxDetector(30.0playeridstringPURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
        
TogglePlayerControllable(IDfalse);
        
ClearAnimations(ID);
        
KillTimer(tazetimer[ID]);
        
pTazed[ID] = 0;
    }
    else
    {
        
pCuffed[ID] = 0;
        
KillTimer(cufftimer[ID]);
        
format(stringsizeof(string), "%s has been uncuffed by %s."RemoveUnderScore(ID), RemoveUnderScore(playerid));
        
ProxDetector(30.0playeridstringPURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
        
TogglePlayerControllable(IDtrue);
    }
    return 
1;
}
forward UnCuff(playerid);
public 
UnCuff(playerid)
{
    
pCuffed[playerid] = 0;
    
TogglePlayerControllable(playeridtrue);
    
SendClientMessage(playeridPURPLE"Your cuffs broke, run!");
    
Dragged[playerid] = 0;
    
KillTimer(draggedtimer[playerid]);
}
/*==============================================================================
--------------------------------------Drag--------------------------------------
==============================================================================*/
cmd(dragplayeridparams[])
{
    new 
IDstring[26+MAX_PLAYER_NAME], string2[20+MAX_PLAYER_NAME];
    if(
sscanf(params"u"ID)) return SendClientMessage(playeridGREY"CMD:/cuff [playerid]");
    if(
pCuffed[ID] == 0) return SendClientMessage(playeridGREY"This player must first be cuffed");
    if(
Dragged[ID] == && Dragging[playerid] == 0)
    {
        
Dragged[ID] = 1;
        
Dragging[playerid] = 1;
        
format(stringsizeof(string), "You are being dragged by %s."RemoveUnderScore(playerid));
        
format(string2sizeof(string2), " You are dragging %s."RemoveUnderScore(ID));
        
SCM(playeridPURPLEstring2);
        
SCM(IDPURPLEstring);
        
draggedtimer[ID] = SetTimerEx("Draggingt"10001"dd"playerid,ID);
    }
    else
    {
        
Dragged[ID] = 0;
        
Dragging[playerid] = 0;
        
SCM(playeridPURPLE"You have stopped dragging your target.");
        
SCM(IDPURPLE"You aren't being dragged anymore.");
        
KillTimer(draggedtimer[ID]);
    }
    return 
1;
}
forward Draggingt(playeridID);
public 
Draggingt(playeridID)
{
    new 
Float:dXFloat:dYFloat:dZ;
    
GetPlayerPos(playeriddXdYdZ);
    
SetPlayerPos(IDdX+1dYdZ);
}
/*==============================================================================
--------------------------------RemoveUnderScore--------------------------------
==============================================================================*/
stock RemoveUnderScore(playerid)
{
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,name,sizeof(name));
    for(new 
0MAX_PLAYER_NAMEi++)
    {
        if(
name[i] == '_'name[i] = ' ';
    }
    return 
name;
}
//==============================================================================
//---------------------------------PROXDETECTOR---------------------------------
//==============================================================================
stock ProxDetector(Float:radiplayeridstring[],col1,col2,col3,col4,col5)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
Float:posxFloat:posyFloat:posz;
        new 
Float:oldposxFloat:oldposyFloat:oldposz;
        new 
Float:tempposxFloat:tempposyFloat:tempposz;
        new 
invehicle[MAX_PLAYERS];
        new 
virtualworld GetPlayerVirtualWorld(playerid);
        new 
interior GetPlayerInterior(playerid);
        new 
vehicleid GetPlayerVehicleID(playerid);
        new 
ivehicleid;
        if(
vehicleid)
        {
            
GetVehiclePos(vehicleid,oldposx,oldposy,oldposz);
        }
        else
        {
            
GetPlayerPos(playeridoldposxoldposyoldposz);
            
vehicleid GetPlayerVehicleID(playerid);
        }
        for(new 
0MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(!
BigEar[i])
                {
                    if(
GetPlayerVirtualWorld(i) == virtualworld)
                    {
                        if((
GetPlayerInterior(i) == interior))
                        {
                            if(
vehicleid)
                            {
                                if(
IsPlayerInVehicle(i,vehicleid)) invehicle[i] = 1;
                            }
                            if(!
invehicle[i])
                            {
                                if(
IsPlayerInAnyVehicle(i))
                                {
                                    
ivehicleid GetPlayerVehicleID(i);
                                    
GetVehiclePos(ivehicleid,posx,posy,posz);
                                }
                                else
                                {
                                    
GetPlayerPos(i,posx,posy,posz);
                                }
                                
tempposx = (oldposx -posx);
                                
tempposy = (oldposy -posy);
                                
tempposz = (oldposz -posz);
                                if (((
tempposx radi/16) && (tempposx > -radi/16)) && ((tempposy radi/16) && (tempposy > -radi/16)) && ((tempposz radi/16) && (tempposz > -radi/16))) SendClientMessage(icol1string);
                                else if (((
tempposx radi/8) && (tempposx > -radi/8)) && ((tempposy radi/8) && (tempposy > -radi/8)) && ((tempposz radi/8) && (tempposz > -radi/8))) SendClientMessage(icol2string);
                                else if (((
tempposx radi/4) && (tempposx > -radi/4)) && ((tempposy radi/4) && (tempposy > -radi/4)) && ((tempposz radi/4) && (tempposz > -radi/4))) SendClientMessage(icol3string);
                                else if (((
tempposx radi/2) && (tempposx > -radi/2)) && ((tempposy radi/2) && (tempposy > -radi/2)) && ((tempposz radi/2) && (tempposz > -radi/2))) SendClientMessage(icol4string);
                                else if (((
tempposx radi) && (tempposx > -radi)) && ((tempposy radi) && (tempposy > -radi)) && ((tempposz radi) && (tempposz > -radi))) SendClientMessage(icol5string);
                            }
                            else 
SendClientMessage(icol1string);
                        }
                    }
                }
                else 
SendClientMessage(icol1string);
            }
        }
    }
    return 
1;
}
/*==============================================================================
-------------------------------------Tazer--------------------------------------
==============================================================================*/
cmd(tazerplayeridparams[])
{
    new 
string[28+MAX_PLAYER_NAME];
    if(
Tazer[playerid] == 0)
    {
        
GivePlayerWeapon(playerid239999);
        
format(stringsizeof(string),"%s has unholstered his tazer."RemoveUnderScore(playerid));
        
ProxDetector(30.0playeridstringPURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
        
Tazer[playerid] = 1;
    }
    else
    {
        
SetPlayerAmmo(playerid230);
        
format(stringsizeof(string),"%s has holstered his tazer."RemoveUnderScore(playerid));
        
Tazer[playerid] = 0;
        
ProxDetector(30.0playeridstringPURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
    }
    return 
1;
}
forward Tazed(playerid);
public 
Tazed(playerid)
{
      
pTazed[playerid] = 0;
      
TogglePlayerControllable(playeridtrue);
      
ClearAnimations(playerid);
      return 
1;
}
public 
OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    if(
GetPlayerWeapon(Shooter) == 23)
    {
         new 
string[17+48], playerid;
        
TogglePlayerControllable(Targetfalse);
        
ApplyAnimation(Target,"CRACK","crckdeth2",4.1,1,1,1,1,1);
        
pTazed[Target] = 1;
        
tazetimer[Target] = SetTimerEx("Tazed"100000"d"Target);
        
format(stringsizeof(string), "%s has been tazed by %s."RemoveUnderScore(Target), RemoveUnderScore(Shooter));
        
ProxDetector(30.0playeridstringPURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
    }
    return 
1;

Reply


Messages In This Thread
Error In Tazer Filterscript - by Immortal99 - 08.08.2016, 20:06
Re: Error In Tazer Filterscript - by Freaksken - 08.08.2016, 20:27
Re: Error In Tazer Filterscript - by Immortal99 - 08.08.2016, 22:17

Forum Jump:


Users browsing this thread: 1 Guest(s)