if(checkpointid == CP_SFCarrier)
{
new string[200];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
new imoney = RandomEx( 10000,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)
{
new string[200];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
new imoney = RandomEx( 10000,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))
{
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))
{
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;
}
CMD:work(playerid,params[])
{
if(gTeam[playerid] == TEAM_ARMY)
{
if(IsPlayerInRangeOfPoint(playerid,50.0,-1314.2576,498.6849,18.2344))
{
CP_SFCarrier = CreateDynamicCP(311.3356,2049.9468,17.6406,-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))
{
CP_A51 = CreateDynamicCP(-1314.2576,498.6849,18.2344,-1,-1,-1,-1,50.0);
SendClientMessage(playerid,COLOR_ORANGE,"[{FFA500}FLIGHT{EEEEEE}]Complete a flight from A51 to SF Carrier");
}
}
return 1;
}
hello at first try this
PHP код:
|
its the same code lol . |
CMD:work(playerid,params[]) { if(gTeam[playerid] == TEAM_ARMY) { if(IsPlayerInRangeOfPoint(playerid,50.0,-1314.2576,498.6849,18.2344)) { 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)) { 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; }
CMD:work(playerid,params[]) { if(gTeam[playerid] == TEAM_ARMY) { if(IsPlayerInRangeOfPoint(playerid,50.0,-1314.2576,498.6849,18.2344)) { CP_SFCarrier = CreateDynamicCP(311.3356,2049.9468,17.6406,-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)) { CP_A51 = CreateDynamicCP(-1314.2576,498.6849,18.2344,-1,-1,-1,-1,50.0); SendClientMessage(playerid,COLOR_ORANGE,"[{FFA500}FLIGHT{EEEEEE}]Complete a flight from A51 to SF Carrier"); } } return 1; }
public OnGameModeInit()
{
CP_SFCarrier = CreateDynamicCP(-1314.2576,498.6849,18.2344,-1,-1,-1,-1,30.0);
CP_A51 = CreateDynamicCP(-1314.2576,498.6849,18.2344,-1,-1,-1,-1,50.0);
return 1;
}
CMD:work(playerid,params[])
{
if(gTeam[playerid] == TEAM_ARMY)
{
if(IsPlayerInDynamicCP(playerid,CP_SFCarrier))
{
SendClientMessage(playerid,COLOR_ORANGE,"[{FFA500}FLIGHT{EEEEEE}]Complete a flight from SF Carrier to A51");
}
if(IsPlayerInDynamicCP(playerid,CP_A51))
{
SendClientMessage(playerid,COLOR_ORANGE,"[{FFA500}FLIGHT{EEEEEE}]Complete a flight from A51 to SF Carrier");
}
}
return 1;
}
CMD:work(playerid,params[])
{
if(gTeam[playerid] == TEAM_ARMY)
{
new Float:d1,Float:d2;
d1=GetPlayerDistanceFromPoint(playerid,-1314.2576,498.6849,18.2344);
d2=GetPlayerDistanceFromPoint(playerid,311.3356,2049.9468,17.6406);
if(d1<d2)
{
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(d2<d1)
{
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;
}
new bool: var0[MAX_PLAYERS];
new bool: var1[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 = RandomEx( 10000,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 = RandomEx( 10000,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;
}