17.07.2013, 18:00
The autowork option in my gamemode is bugged at the moment and doesn't actually work. Instead i'm trying to set it up so when you type /w (work) to start a mission, it will start at the NEAREST checkpoint. Right now it is set to random. Below is the code, anybody know how to fix this? Thanks
Код:
else if(TypeFlight[playerid] == 4) // dodo
{
StartedMission[playerid] = 1;
new rand = random(sizeof(DSLocations));
new string2[65], message[128];
SetPlayerFlightCheckpoint(playerid, DSLocations[rand][LocX],DSLocations[rand][LocY],DSLocations[rand][LocZ], 15.0);
format(string2, sizeof(string2), "%s", DSLocations[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 passenger.", DSLocations[rand][LocationName]);
SendClientMessage(playerid, COLOR_WHITE, message);
MissionStage[playerid] = 1;
WantsRecording[playerid] = 1;
Pos1[playerid] = DSLocations[rand][LocX];
Pos2[playerid] = DSLocations[rand][LocY];
Pos3[playerid] = DSLocations[rand][LocZ];
}


