Help me in [Else]
#1

Hello
guys
i want know how to make in 1 command adding this with it
PHP код:
CMD:robberyplayeridparams[ ] )
{
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        if ( !
IsPlayerInRangeOfPointplayerid3.0, -23.4826,-55.6319,1003.5469 ) )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        if ( 
SevenRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza 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;
        
SevenRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2);
        return 
true;

PHP код:
        if ( pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        if ( !
IsPlayerInRangeOfPointplayerid3.0, -23.4826,-55.6319,1003.5469 ) )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        if ( 
SexShopRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza 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;
        
SevenRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2); 
i want know how to add this code with the Pizza
how ?
Reply
#2

error when i made else my robing 2
Quote:

D:\tryrobs.pwn(81) : error 029: invalid expression, assumed zero
D:\tryrobs.pwn(81 -- 83) : warning 215: expression has no effect
D:\tryrobs.pwn(83) : error 001: expected token: ";", but found "if"
D:\tryrobs.pwn(89) : error 017: undefined symbol "SexShopRobbed"
D:\tryrobs.pwn(100) : error 021: symbol already defined: "szStr"

PHP код:
CMD:robberyplayeridparams[ ] )
{
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        if ( !
IsPlayerInRangeOfPointplayerid3.0, -23.4826,-55.6319,1003.5469 ) )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        if ( 
SevenRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza 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;
        
SevenRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2);
        
        else
        
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        if ( !
IsPlayerInRangeOfPointplayerid3.0, -23.4826,-55.6319,1003.5469 ) )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        if ( 
SexShopRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza 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;
        
SevenRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2);
        return 
true;

Reply
#3

You must add } and { between else restriction

pawn Код:
}
else
{
Remember that { / } open and close the sentences
Reply
#4

there much error now
this my all code
PHP код:
#include <a_samp>
#include <Streamer>
#include <zcmd>
#define RED -1
#define ROB -1
#define INFO -1
forward robSevenplayerid ); //Add this to the top of your script under your includes!
forward robSexShopplayerid ); //Add this to the top of your script under your includes!
//IDLEWOOD PIZZA
new
        
robTimerPMAX_PLAYERS ],
        
cp_Seven,
        
cp_SexShop,
        
boolpRobbingPMAX_PLAYERS ],
        
boolSevenRobbed;
public 
OnGameModeInit()
{
    
cp_SexShop CreateDynamicCP(-104.1407,-22.6708,1000.71883.0, .interiorid = -1);
    
cp_Seven CreateDynamicCP(-23.4826,-55.6319,1003.54693.0, .interiorid = -1);
    return 
1;
}
public 
OnPlayerEnterDynamicCPplayeridcheckpointid )
{
    if( 
pRobbingPplayerid ] )
    {
            if ( 
checkpointid == cp_Seven )
            {
                
pRobbingPplayerid ] = false;
                
KillTimerrobTimerPplayerid ] );
                
SevenRobbed false;
                
GameTextForPlayerplayerid"~r~You have failed the robbery!"1000);
            }
    }
    if( 
pRobbingPplayerid ] )
    {
            if ( 
checkpointid == cp_SexShop )
            {
                
pRobbingPplayerid ] = false;
                
KillTimerrobTimerPplayerid ] );
                
SevenRobbed false;
                
GameTextForPlayerplayerid"~r~You have failed the robbery!"1000);
            }
    }
    return 
true;
}
CMD:robberyplayeridparams[ ] )
{
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        if ( !
IsPlayerInRangeOfPointplayerid3.0, -23.4826,-55.6319,1003.5469 ) )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        if ( 
SevenRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza 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;
        
SevenRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2);
        }
        else
        {
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        if ( !
IsPlayerInRangeOfPointplayerid3.0, -23.4826,-55.6319,1003.5469 ) )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        if ( 
SexShopRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza 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;
        
SevenRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2);
        return 
true;
}
public 
robSevenplayerid )
{
        new
            
randMoney random96000 );
        
GivePlayerMoneyplayeridrandMoney );
        new
            
szStr128 ],
            
szStr1[128],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has robbed $%d from Idlewood Pizza!"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 Idlewood Pizza!"randMoney);
        
GameTextForPlayerplayeridszStr13000);
        
SetPlayerScore(playeridGetPlayerScore(playerid) +);
        
}
public 
robSexShopplayerid )
{
        new
            
randMoney random96000 );
        
GivePlayerMoneyplayeridrandMoney );
        new
            
szStr128 ],
            
szStr1[128],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has robbed $%d from Idlewood Pizza!"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 Idlewood Pizza!"randMoney);
        
GameTextForPlayerplayeridszStr13000);
        
SetPlayerScore(playeridGetPlayerScore(playerid) +);
}
forward SexShopDelay( );
public 
SexShopDelay( )
{
    
SevenRobbed false;
    return 
true;
}
forward SevenDelay( );
public 
SevenDelay( )
{
    
SevenRobbed false;
    return 
true;

help me please
when compile there much errors
Reply
#5

Quote:
Originally Posted by sas10
Посмотреть сообщение
error when i made else my robing 2

PHP код:
CMD:robberyplayeridparams[ ] )
{
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        if ( !
IsPlayerInRangeOfPointplayerid3.0, -23.4826,-55.6319,1003.5469 ) )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        if ( 
SevenRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza 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;
        
SevenRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2);
        
        else
        
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        if ( !
IsPlayerInRangeOfPointplayerid3.0, -23.4826,-55.6319,1003.5469 ) )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        if ( 
SexShopRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza 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;
        
SevenRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2);
        return 
true;

you're simply missing the curly brackets which open/close your compound statements.
just like in most programming languages,
a simple if - else control structure looks as follows:
pawn Код:
if(/*CONDITION*/)
{
    //do stuff
}
else
{
    //do other stuff
}
you want something like...
pawn Код:
CMD:robbery( playerid, params[ ] )
{
    if(/*some condition defined by you*/)
    {
        if ( pRobbingP[ playerid ] )
                return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );

        if ( !IsPlayerInRangeOfPoint( playerid, 3.0, -23.4826,-55.6319,1003.5469 ) )
            return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );

        if ( SevenRobbed )
            return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} Idlewood Pizza has been robbed recently, please wait patiently!" );

        robTimerP[ playerid ] = SetTimerEx( "robPizza", 30000, false, "i", playerid );

        SendClientMessage( playerid, INFO, "[ROBBERY INFO] You have started a robbery, it will last 30 seconds. Do not leave the checkpoint!" );

        pRobbingP[ playerid ] = true;
        SevenRobbed = true;

        new
            szStr[ 128 ],
            usrName[ 24 ];

        GetPlayerName( playerid, usrName, 24 );
        format( szStr, 128, "[ROBBERY] %s has began a robbery at Idlewood Pizza!", usrName );
        SendClientMessageToAll( ROB, szStr );

        GameTextForPlayer( playerid, "~g~Robbery in process~n~~r~Do not leave the checkpoint!", 30000, 3 );
        SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) +2);
    }
    else
    {
        if ( pRobbingP[ playerid ] )
                return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );

        if ( !IsPlayerInRangeOfPoint( playerid, 3.0, -23.4826,-55.6319,1003.5469 ) )
            return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );

        if ( SexShopRobbed )
            return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} Idlewood Pizza has been robbed recently, please wait patiently!" );

        robTimerP[ playerid ] = SetTimerEx( "robPizza", 30000, false, "i", playerid );

        SendClientMessage( playerid, INFO, "[ROBBERY INFO] You have started a robbery, it will last 30 seconds. Do not leave the checkpoint!" );

        pRobbingP[ playerid ] = true;
        SevenRobbed = true;

        new
            szStr[ 128 ],
            usrName[ 24 ];

        GetPlayerName( playerid, usrName, 24 );
        format( szStr, 128, "[ROBBERY] %s has began a robbery at Idlewood Pizza!", usrName );
        SendClientMessageToAll( ROB, szStr );

        GameTextForPlayer( playerid, "~g~Robbery in process~n~~r~Do not leave the checkpoint!", 30000, 3 );
        SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) +2);
    }
    return 1;
}
right? kinda weird though, as both compounds do the exact same thing... you need to tell us what you wanna do
Reply
#6

Quote:
Originally Posted by CutX
Посмотреть сообщение
you're simply missing the curly brackets which open/close your compound statements.
just like in most programming languages,
a simple if - else control structure looks as follows:
pawn Код:
if(/*CONDITION*/)
{
    //do stuff
}
else
{
    //do other stuff
}
you want something like...
pawn Код:
CMD:robbery( playerid, params[ ] )
{
    if(/*some condition defined by you*/)
    {
        if ( pRobbingP[ playerid ] )
                return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );

        if ( !IsPlayerInRangeOfPoint( playerid, 3.0, -23.4826,-55.6319,1003.5469 ) )
            return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );

        if ( SevenRobbed )
            return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} Idlewood Pizza has been robbed recently, please wait patiently!" );

        robTimerP[ playerid ] = SetTimerEx( "robPizza", 30000, false, "i", playerid );

        SendClientMessage( playerid, INFO, "[ROBBERY INFO] You have started a robbery, it will last 30 seconds. Do not leave the checkpoint!" );

        pRobbingP[ playerid ] = true;
        SevenRobbed = true;

        new
            szStr[ 128 ],
            usrName[ 24 ];

        GetPlayerName( playerid, usrName, 24 );
        format( szStr, 128, "[ROBBERY] %s has began a robbery at Idlewood Pizza!", usrName );
        SendClientMessageToAll( ROB, szStr );

        GameTextForPlayer( playerid, "~g~Robbery in process~n~~r~Do not leave the checkpoint!", 30000, 3 );
        SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) +2);
    }
    else
    {
        if ( pRobbingP[ playerid ] )
                return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );

        if ( !IsPlayerInRangeOfPoint( playerid, 3.0, -23.4826,-55.6319,1003.5469 ) )
            return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );

        if ( SexShopRobbed )
            return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} Idlewood Pizza has been robbed recently, please wait patiently!" );

        robTimerP[ playerid ] = SetTimerEx( "robPizza", 30000, false, "i", playerid );

        SendClientMessage( playerid, INFO, "[ROBBERY INFO] You have started a robbery, it will last 30 seconds. Do not leave the checkpoint!" );

        pRobbingP[ playerid ] = true;
        SevenRobbed = true;

        new
            szStr[ 128 ],
            usrName[ 24 ];

        GetPlayerName( playerid, usrName, 24 );
        format( szStr, 128, "[ROBBERY] %s has began a robbery at Idlewood Pizza!", usrName );
        SendClientMessageToAll( ROB, szStr );

        GameTextForPlayer( playerid, "~g~Robbery in process~n~~r~Do not leave the checkpoint!", 30000, 3 );
        SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) +2);
    }
    return 1;
}
right? kinda weird though, as both is the same... you need to tell us what you wanna do
still error
this my full code
PHP код:
#include <a_samp>
#include <Streamer>
#include <zcmd>
#define RED -1
#define ROB -1
#define INFO -1
forward robSevenplayerid ); //Add this to the top of your script under your includes!
forward robSexShopplayerid ); //Add this to the top of your script under your includes!
//IDLEWOOD PIZZA
new
        
robTimerPMAX_PLAYERS ],
        
cp_Seven,
        
cp_SexShop,
        
boolpRobbingPMAX_PLAYERS ],
        
boolSevenRobbed;
public 
OnGameModeInit()
{
    
cp_SexShop CreateDynamicCP(-104.1407,-22.6708,1000.71883.0, .interiorid = -1);
    
cp_Seven CreateDynamicCP(-23.4826,-55.6319,1003.54693.0, .interiorid = -1);
    return 
1;
}
public 
OnPlayerEnterDynamicCPplayeridcheckpointid )
{
    if( 
pRobbingPplayerid ] )
    {
            if ( 
checkpointid == cp_Seven )
            {
                
pRobbingPplayerid ] = false;
                
KillTimerrobTimerPplayerid ] );
                
SevenRobbed false;
                
GameTextForPlayerplayerid"~r~You have failed the robbery!"1000);
            }
    }
    if( 
pRobbingPplayerid ] )
    {
            if ( 
checkpointid == cp_SexShop )
            {
                
pRobbingPplayerid ] = false;
                
KillTimerrobTimerPplayerid ] );
                
SevenRobbed false;
                
GameTextForPlayerplayerid"~r~You have failed the robbery!"1000);
            }
    }
    return 
true;
}
CMD:robberyplayeridparams[ ] )
{
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        if ( !
IsPlayerInRangeOfPointplayerid3.0, -23.4826,-55.6319,1003.5469 ) )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        if ( 
SevenRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza 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;
        
SevenRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2);
        }
        else
        {
        if ( 
pRobbingPplayerid ] )
                return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
        if ( !
IsPlayerInRangeOfPointplayerid3.0, -23.4826,-55.6319,1003.5469 ) )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
        if ( 
SexShopRobbed )
            return 
SendClientMessageplayeridRED"ERROR:{FFFFFF} Idlewood Pizza 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;
        
SevenRobbed true;
        new
            
szStr128 ],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has began a robbery at Idlewood Pizza!"usrName );
        
SendClientMessageToAllROBszStr );
        
GameTextForPlayerplayerid"~g~Robbery in process~n~~r~Do not leave the checkpoint!"30000);
        
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) +2);
        }
        return 
true;
}
public 
robSevenplayerid )
{
        new
            
randMoney random96000 );
        
GivePlayerMoneyplayeridrandMoney );
        new
            
szStr128 ],
            
szStr1[128],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has robbed $%d from Idlewood Pizza!"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 Idlewood Pizza!"randMoney);
        
GameTextForPlayerplayeridszStr13000);
        
SetPlayerScore(playeridGetPlayerScore(playerid) +);
        
}
public 
robSexShopplayerid )
{
        new
            
randMoney random96000 );
        
GivePlayerMoneyplayeridrandMoney );
        new
            
szStr128 ],
            
szStr1[128],
            
usrName24 ];
        
GetPlayerNameplayeridusrName24 );
        
formatszStr128"[ROBBERY] %s has robbed $%d from Idlewood Pizza!"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 Idlewood Pizza!"randMoney);
        
GameTextForPlayerplayeridszStr13000);
        
SetPlayerScore(playeridGetPlayerScore(playerid) +);
}
forward SexShopDelay( );
public 
SexShopDelay( )
{
    
SevenRobbed false;
    return 
true;
}
forward SevenDelay( );
public 
SevenDelay( )
{
    
SevenRobbed false;
    return 
true;

im new i get tut. there 1 robing only i add the new SexShop to robing it too
and i adding in cmd:robbery
the sexshop
and i have much error
Reply
#7

what u mean here put ?
Quote:

if(/*some condition defined by you*/)

there 1 error only
Quote:

D:\tryrobs.pwn(90) : error 017: undefined symbol "SexShopRobbed"

line 90
Quote:

if ( SexShopRobbed )

Reply
#8

Quote:
Originally Posted by sas10
Посмотреть сообщение
what u mean here put ?

there 1 error only

line 90
as for the undefined symbol, show me how you declared it
you're the guy from here writing
pawn Код:
bool:SexShopRobbed;//is wrong
//you have to do it like:
new bool:SexShopRobbed;
and by "put", i mean that there's supposed to be some condition defined by you
something like
pawn Код:
if(someVar == 1) //continue to do stuff...
but really, it makes no sense doing the exact same thing in the else statement.
i hope you know what youre doing
Reply
#9

You are't defining that variable.
To be honest i think you should learn basic pawn before ask those questions
Reply
#10

sorry guys i dont defning it
compile not error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)