SA-MP Forums Archive
/robstore command problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /robstore command problem (/showthread.php?tid=528824)



/robstore command problem - UserName31 - 30.07.2014

hey how can i do when if player is not in the checkpoint ill return them a message saying you must be in local store here code +rep

PHP код:
cmd(robstoreplayeridparams[])
{
    
IsPlayerInDynamicCP(playerid,Checkpoint[9]);
    {
        
SendClientMessage(playeridCOLOR_RED"You have started a robbery in LS 69  Cent Store!.");
        new 
string[120];
        
format(string120"[DISPATCH] %s Has started a robbery at Los Santos 69 Cent Store in idlewood!",PlayerName(playerid));
        
SendCopMessage(string);
        
RadioInfo[playerid][pCopRadio] = 1;
        
RobbingInfo[playerid][pRobbing69cent] = 30;
        
RobbingInfo[playerid][pRobbed69cent] = 50;
        return 
1;
    }




Re: /robstore command problem - UserName31 - 30.07.2014

never mind my opologies for this i have fixed the problem seems like i had to add i
Quote:

f(IsPlayerInDynamicCP(playerid,Checkpoint[9])




Re: /robstore command problem - Sharpadox - 30.07.2014

u need just a return if statement

pawn Код:
cmd(robstore, playerid, params[])
{
    IsPlayerInDynamicCP(playerid,Checkpoint[9])
    {
        new string[120];
        SendClientMessage(playerid, COLOR_RED, "You have started a robbery in LS 69  Cent Store!.");
        format(string, 120, "[DISPATCH] %s Has started a robbery at Los Santos 69 Cent Store in idlewood!",PlayerName(playerid));
        SendCopMessage(string);
        RadioInfo[playerid][pCopRadio] = 1;
        RobbingInfo[playerid][pRobbing69cent] = 30;
        RobbingInfo[playerid][pRobbed69cent] = 50;
        return 1;
    }
    return SendClientMessage(playerid,-1,"* You are not in a local store!");
}