Checkpoint Problem
#1

I have added a new taxi job system, My gamemode has some Checkpoints , So for example when i start taxi job i get Red Checkpoint on map but if i drive near a cp from my gamemode the Taxi Cp disappear any HELP pleaseee
+Rep for eveyone who Helped me i'm stuck :/
My question is can we replace checkpoints with something else ?
Reply
#2

Use something like:

Quote:

public OnPlayerEnterCheckpoint(playerid)
{
if(TaxiJob[playerid] == 1)
{
something
return 1;
}

To let the player only use the checkpoint if he has a certain value.
Reply
#3

Quote:
Originally Posted by lNoobOnDutyl
Посмотреть сообщение
Use something like:

Quote:

public OnPlayerEnterCheckpoint(playerid)
{
if(TaxiJob[playerid] == 1)
{
something
return 1;
}

To let the player only use the checkpoint if he has a certain value.
I'm sure a more efficient way would be (or a way most people use)
PHP код:
//instead of ==1
if(TaxiJob[playerid])
//for false
if(!TaxiJob[playerid]) 
Expanding on this:
PHP код:
new IsPlayerTaxiDriver[MAX_PLAYERS];
CMD:taxi(playerid,params[])
{
        if (!
IsPlayerTaxiDriver[playerid]) //if they are not on duty turn it on
        
{
            
SendClientMessage(playerid, -1"You have toggled taxi driver on");
            
toggleHelper[playerid] = true;
        }
        else if (
IsPlayerTaxiDriver[playerid]) //if they are on duty turn it off
        
{
            
SendClientMessage(playerid, -1"You have toggled taxi driver off.");
            
toggleHelper[playerid] = false;
        }
}
public 
OnPlayerEnterCheckpoint(playerid)
{
if(
IsPlayerTaxiDriver[playerid]) //allow them
{
    
SendClientMessage(playerid, -1"it works");
}
else
{
    
SendClientMessage(playerid, -1"you're not a taxi driver");
    return 
1;
}
{
}

Reply
#4

Thanks Guys +Rep Both of you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)