Detect Trailer id?
#1

Hello! In the enun when i made missions i want to choose wich trailer id the mission is for.

Also like this:
{0, "Hauling 1 to Hauling 2", -24.4073, -281.8898, 5.9985, -305.4319, 1315.6797, 54.6189, 0, 584, 10780},
The 584 is the id of the trailer, Also i want to choose wich trailer the id is for

How can i do it? Here is the script
http://pastebin.com/ZWja9JpJ
Reply
#2

Replace TrailerID[MAX_PLAYERS] to PlayerMissionID[MAX_PLAYERS] and set on start missionid to player array

pawn Код:
PlayerMissionID[playerid] = missionid_here;
then
pawn Код:
if(GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == PetrolTruckerLocations[PlayerMissionID[playerid]][TrailID])
and you don't need these xd
pawn Код:
new     MissionText[512][MAX_PLAYERS], Float:unx[MAX_PLAYERS], Float:uny[MAX_PLAYERS], Float:unz[MAX_PLAYERS], TrailerID[MAX_PLAYERS], Payment[MAX_PLAYERS], MissionStatus[MAX_PLAYERS];
only
pawn Код:
new PlayerMissionID[MAX_PLAYERS];
because everything is here
pawn Код:
new PetrolTruckerLocations[][PetrolTruckerLocationsEnum]
text,x,y,z,pay..
Reply
#3

Quote:
Originally Posted by Jefff
Посмотреть сообщение
Replace TrailerID[MAX_PLAYERS] to PlayerMissionID[MAX_PLAYERS] and set on start missionid to player array

pawn Код:
PlayerMissionID[playerid] = missionid_here;
then
pawn Код:
if(GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == PetrolTruckerLocations[PlayerMissionID[playerid]][TrailID])
and you don't need these xd
pawn Код:
new     MissionText[512][MAX_PLAYERS], Float:unx[MAX_PLAYERS], Float:uny[MAX_PLAYERS], Float:unz[MAX_PLAYERS], TrailerID[MAX_PLAYERS], Payment[MAX_PLAYERS], MissionStatus[MAX_PLAYERS];
only
pawn Код:
new PlayerMissionID[MAX_PLAYERS];
because everything is here
pawn Код:
new PetrolTruckerLocations[][PetrolTruckerLocationsEnum]
text,x,y,z,pay..
http://pastebin.com/HZsN5jx8 Almost got it, can you "fix" it and send it to me?
Reply
#4

Nobody?
Reply
#5

http://pastebin.com/9BsVT6wq
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)