16.09.2016, 13:56
(
Last edited by Shaheen; 16/09/2016 at 07:55 PM.
)
Hello
I am Scripting a new Server. so i need a Help in getting nearest Checkpoint :
Here is the code
I am Scripting a new Server. so i need a Help in getting nearest Checkpoint :
Here is the code
PHP Code:
public StartMission(playerid)
{
if(TypeFlight[playerid] == 1) // Andromada
{
StartedMission[playerid] = 1;
new rand = random(sizeof(ALocations));
new string2[65], message[128];
SetPlayerFlightCheckpoint(playerid, ALocations[rand][LocX],ALocations[rand][LocY],ALocations[rand][LocZ], 15.0);
format(string2, sizeof(string2), "%s", ALocations[rand][LocationName]); //PASSWORD
strmid(FirstAPName[playerid], string2, 0, strlen(string2), 128); //PASSWORD
//FirstAPName[playerid] = ALocations[rand][LocationName];
//FirstAPName[playerid] = AndroDName;
format(message,sizeof(message), "Head to {1B8AE4}%s {FFFFFF}and pick up the cargo goods.", ALocations[rand][LocationName]);
SendClientMessage(playerid, COLOR_WHITE, message);
TypeFlight[playerid] = 1;
MissionStage[playerid] = 1;
WantsRecording[playerid] = 1;
Pos1[playerid] = ALocations[rand][LocX];
Pos2[playerid] = ALocations[rand][LocY];
Pos3[playerid] = ALocations[rand][LocZ];