How can i make this work ?
#10

Ah ok ^^

you can use a variables example

PHP код:
new boolvar0[MAX_PLAYERS];
new 
boolvar1[MAX_PLAYERS];
if(
checkpointid == CP_SFCarrier)
{
    if(
var0[playerid] == false)    {  CP_A51 CreateDynamicCP(311.3356,2049.9468,17.6406,-1,-1,-1,-1,50.0);  var0[playerid] = true; break; }
    if(
var1[playerid] != false)    {
    new 
string[200];
    new 
pName[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    new 
imoney RandomEx10000,30000 );
    
format(string,sizeof(string),"[{FFA500}FLIGHT COMPLETED{EEEEEE}]You completed a flight from A51 to SF Carrier and got %d",imoney);
    
SendClientMessage(playerid,COLOR_ORANGE,string);
    
format(string,sizeof(string),"[{FFA500}ARMY FLIGHT{EEEEEE}%s has completed a military flight from A51 to SF Carrier and got %d",pName,imoney);
    
SendClientMessageToAll(COLOR_ORANGE,string);
    }
}
if(
checkpointid == CP_A51)
{
    if(
var1[playerid] == false)    {  CP_SFCarrier CreateDynamicCP(-1314.2576,498.6849,18.2344,-1,-1,-1,-1,30.0);  var1[playerid] = true; break; }
    if(
var0[playerid] != false)    {
    new 
string[200];
    new 
pName[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    new 
imoney RandomEx10000,30000 );
    
format(string,sizeof(string),"[{FFA500}FLIGHT COMPLETED{EEEEEE}]You completed a flight from SF Carrier to A51 and got %d",imoney);
    
SendClientMessage(playerid,COLOR_ORANGE,string);
    
format(string,sizeof(string),"[{FFA500}ARMY FLIGHT{EEEEEE}%s has completed a military flight from SF Carrier to A51 and got %d",pName,imoney);
    
SendClientMessageToAll(COLOR_ORANGE,string);
    }
}
CMD:work(playerid,params[])
{
    if(
gTeam[playerid] == TEAM_ARMY)
    {
        if(
IsPlayerInRangeOfPoint(playerid,50.0,-1314.2576,498.6849,18.2344))
        {
            
var0[playerid] = false;
            
CP_SFCarrier CreateDynamicCP(-1314.2576,498.6849,18.2344,-1,-1,-1,-1,30.0);
            
SendClientMessage(playerid,COLOR_ORANGE,"[{FFA500}FLIGHT{EEEEEE}]Complete a flight from SF Carrier to A51");
        }
        if(
IsPlayerInRangeOfPoint(playerid,50.0,311.3356,2049.9468,17.6406))
        {
            
var1[playerid] = false;
            
CP_A51 CreateDynamicCP(311.3356,2049.9468,17.6406,-1,-1,-1,-1,50.0);
            
SendClientMessage(playerid,COLOR_ORANGE,"[{FFA500}FLIGHT{EEEEEE}]Complete a flight from A51 to SF Carrier");
        }
    }
    return 
1;

PS : failed Break must be return true;
Reply


Messages In This Thread
How can i make this work ? - by Johnson_Brooks - 24.05.2014, 19:55
Re: How can i make this work ? - by Johnson_Brooks - 25.05.2014, 08:49
Re : How can i make this work ? - by yusei - 25.05.2014, 08:59
Re: Re : How can i make this work ? - by Johnson_Brooks - 25.05.2014, 09:16
Re: How can i make this work ? - by superrobot48 - 25.05.2014, 09:22
Re : How can i make this work ? - by yusei - 25.05.2014, 09:24
Re: How can i make this work ? - by biker122 - 25.05.2014, 09:27
Re: How can i make this work ? - by BroZeus - 25.05.2014, 09:35
Re: How can i make this work ? - by Johnson_Brooks - 25.05.2014, 10:00
Re : How can i make this work ? - by yusei - 25.05.2014, 10:15

Forum Jump:


Users browsing this thread: 5 Guest(s)