[Help]Me
#1

Hello
guys i Want Know how to make in 1 commands all my new checkpoints robing with else
please help me and i want know when im adding the cp making it new cp_name;
its error why ?
this my code i want 1 making only else to know +rep
PHP код:
#include <a_samp>
#include <Streamer>
#include <zcmd>
#define RED -1
#define ROB -1
#define INFO -1
forward robPizzaplayerid ); //Add this to the top of your script under your includes!
//IDLEWOOD PIZZA
new
        
robTimerPMAX_PLAYERS ],
        
cp_Pizza,
        
boolpRobbingPMAX_PLAYERS ],
        
boolpizzaRobbed;
public 
OnGameModeInit()
{
    
cp_ammo CreateDynamicCP(314.2581,-133.9305,999.60163.0, .interiorid = -1);
    
cp_gym CreateDynamicCP(766.4841,-60.3234,1000.65633.0, .interiorid = -1);
    
cp_cluckin CreateDynamicCP(2102.0273,2228.6897,11.02343.0, .interiorid = -1);
    
cp_binco CreateDynamicCP(207.7002,-100.3267,1005.25783.0, .interiorid = -1);
    
cp_zip CreateDynamicCP(161.5211,-83.2518,1001.80473.0, .interiorid = -1);
    
cp_barber CreateDynamicCP(418.3281,-78.8948,1001.80473.0, .interiorid = -1);
    
cp_tatto CreateDynamicCP(-201.9816,-25.0213,1002.27343.0, .interiorid = -1);
    
cp_sexshop CreateDynamicCP(-104.1407,-22.6708,1000.71883.0, .interiorid = -1);
    
cp_seven CreateDynamicCP(-23.4826,-55.6319,1003.54693.0, .interiorid = -1);
    
cp_Pizza CreateDynamicCP(376.0387,-117.2744,1001.49223.0, .interiorid = -1);
    return 
1;
}
public 
OnPlayerEnterDynamicCPplayeridcheckpointid )
{
    if( 
pRobbingPplayerid ] )
    {
            if ( 
checkpointid == cp_seven )
            if ( 
checkpointid == cp_ammo )
            if ( 
checkpointid == cp_gym )
            if ( 
checkpointid == cp_cluckin )
            if ( 
checkpointid == cp_zip )
            if ( 
checkpointid == cp_zip )
            if ( 
checkpointid == cp_barber )
            if ( 
checkpointid == cp_tatto )
            if ( 
checkpointid == cp_sexshop )
            if ( 
checkpointid == cp_Pizza )
            {
                
pRobbingPplayerid ] = false;
                
KillTimerrobTimerPplayerid ] );
                
pizzaRobbed false;
                
GameTextForPlayerplayerid"~r~You have failed the robbery!"1000);
            }
    }
    return 
true;
}
CMD:robberyplayeridparams[ ] )
{
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing " );
        if ( !
IsPlayerInRangeOfPointplayerid3.0, -23.4826,-55.6319,1003.5469 ) )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint to use this command!" );
        if ( 
pizzaRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Robing has been robbed recently, please wait patiently!" );
        
robTimerPplayerid ] = SetTimerEx"robPizza"30000false"i"playerid );
        
SendClientMessageplayeridINFO"[ROBBERY INFO] You have started a robbery, it will last 30 seconds. Do not leave the checkpoint!" );
        
pRobbingPplayerid ] = true;
        
pizzaRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery store"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +5);
        return 
true;
}
public 
robPizzaplayerid )
{
        new
            
randMoney random96000 );
        
GivePlayerMoneyplayeridrandMoney );
        new
            
szStr128 ],
            
szStr1[128],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has robbed $%d from store"usrNamerandMoney );
        
SendClientMessageToAllROBszStr );
        
formatszStr128"[ROBBERY INFO] Robbery succesfull! You have earned $%d and 1 score from the robbery."randMoney );
        
SendClientMessageplayeridINFOszStr );
        
pRobbingPplayerid ] = false;
        
SetTimer"pizzaDelay"90000false );
        
format(szStr1sizeof (szStr1), "~g~You have succesfuly robbed $%d from store"randMoney);
        
GameTextForPlayerplayeridszStr13000);
        
SetPlayerScore(playeridGetPlayerScore(playerid) +);
        
}
forward pizzaDelay( );
public 
pizzaDelay( )
{
    
pizzaRobbed false;
    return 
true;

Reply
#2

please help me +rep
Reply
#3

see
Quote:

D:\da\filterscripts\tryrob.pwn(22) : error 017: undefined symbol "cp_ammo"
D:\da\filterscripts\tryrob.pwn(23) : error 017: undefined symbol "cp_gym"
D:\da\filterscripts\tryrob.pwn(24) : error 017: undefined symbol "cp_cluckin"
D:\da\filterscripts\tryrob.pwn(25) : error 017: undefined symbol "cp_binco"
D:\da\filterscripts\tryrob.pwn(26) : error 017: undefined symbol "cp_zip"
D:\da\filterscripts\tryrob.pwn(27) : error 017: undefined symbol "cp_barber"
D:\da\filterscripts\tryrob.pwn(2 : error 017: undefined symbol "cp_tatto"
D:\da\filterscripts\tryrob.pwn(29) : error 017: undefined symbol "cp_sexshop"
D:\da\filterscripts\tryrob.pwn(30) : error 017: undefined symbol "cp_seven"
D:\da\filterscripts\tryrob.pwn(39) : error 017: undefined symbol "cp_seven"
D:\da\filterscripts\tryrob.pwn(40) : error 017: undefined symbol "cp_ammo"

i add all with this way but still error
new cp_seven;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)