25.06.2018, 08:52
PHP код:
new arrMissionVeh[3];
#define gVeh GetPlayerVehicleID
public OnGameModeInit(){
arrMissionVeh[0]=CreateVehicle(522, 0.0, 0.0, 0.0,0.0, -1, -1, 60);
arrMissionVeh[1]=CreateVehicle(522, 0.0, 0.0, 0.0,0.0, -1, -1, 60);
arrMissionVeh[2]=CreateVehicle(522, 0.0, 0.0, 0.0,0.0, -1, -1, 60);
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate){
new vid=gVeh(playerid);
if( oldstate==PLAYER_STATE_ONFOOT &&
newstate==PLAYER_STATE_DRIVER &&
vid==arrMissionVeh[1]){
//your mission code here
}
return 1;
}