How can I detect this?
#2

Is this what you're looking for?

PHP Code:
#include <a_samp>
new bool:g_CPCheck1[MAX_PLAYERS];
new 
bool:g_CPCheck2[MAX_PLAYERS];
public 
OnPlayerSpawn(playerid)
{
    
SetPlayerCheckpoint(playerid2493.9133, -1682.398613.33873.0);/*XYZ Coords*/
    
g_CPCheck1[playerid] = true;
    
/*XYZ Coords*/
    
return 1;
}
 
public 
OnPlayerEnterCheckpoint(playerid)
{
    new 
money GetPlayerMoney(playerid);
    if(
money 300 && g_CPCheck2[playerid])
    {
        
DisablePlayerCheckpoint(playerid);
        return 
SendClientMessage(playerid, -1"Failed");
    }
    if(
money <= && g_CPCheck1[playerid])
    { 
        
GivePlayerMoney(playerid300);
        
DisablePlayerCheckpoint(playerid);
        
SetPlayerCheckpoint(playerid2483.9133, -1672.398613.33873.0);
        
SendClientMessage(playerid, -1"Take $300, go to the next checkpoint.");
        
g_CPCheck2[playerid] = true;
        
g_CPCheck1[playerid] = false;
    }
    else
        return 
SendClientMessage(playerid, -1"You must have $0");
    return 
1;

Reply


Messages In This Thread
How can I detect this? - by Zeus666 - 29.10.2018, 20:17
Re: How can I detect this? - by TheToretto - 29.10.2018, 22:21
Re: How can I detect this? - by Zeus666 - 30.10.2018, 11:41
Re: How can I detect this? - by TheToretto - 30.10.2018, 12:35
Re: How can I detect this? - by Zeus666 - 30.10.2018, 19:10
Re: How can I detect this? - by TheToretto - 30.10.2018, 19:30
Re: How can I detect this? - by Zeus666 - 31.10.2018, 09:06
Re: How can I detect this? - by TheToretto - 31.10.2018, 09:37
Re: How can I detect this? - by Zeus666 - 31.10.2018, 09:51
Re: How can I detect this? - by TheToretto - 31.10.2018, 09:58
Re: How can I detect this? - by Zeus666 - 31.10.2018, 10:13
Re: How can I detect this? - by TheToretto - 31.10.2018, 10:25
Re: How can I detect this? - by Zeus666 - 31.10.2018, 10:28
Re: How can I detect this? - by TheToretto - 31.10.2018, 10:30

Forum Jump:


Users browsing this thread: 3 Guest(s)