new thidden[25]; thidden[0] = CreateVehicle(591,2296.66479492,-1695.09020996,14.25414467,179.32501221,0,0,150000); //Trailer 3 thidden[1] = CreateVehicle(591,1100.88671875,-820.34722900,87.64498901,90.36413574,0,0,150000); //Trailer 3 thidden[2] = CreateVehicle(591,156.06054688,-1960.29003906,4.47311258,269.04968262,0,0,150000); //Trailer 3 thidden[3] = CreateVehicle(591,867.93475342,-595.09338379,18.88192177,90.36254883,0,0,150000); //Trailer 3 thidden[4] = CreateVehicle(591,1027.16662598,157.10098267,30.46110344,84.40759277,0,0,150000); //Trailer 3 thidden[5] = CreateVehicle(591,979.31634521,-48.72017288,79.97157288,106.23742676,0,0,150000); //Trailer 3 thidden[6] = CreateVehicle(591,-1107.37683105,-1630.90722656,77.07361603,269.26727295,0,0,150000); //Trailer 3 thidden[7] = CreateVehicle(591,-378.79687500,-1445.32617188,26.42623711,4.76806641,0,0,150000); //Trailer 3 thidden[8] = CreateVehicle(591,-1788.20458984,-1605.11499023,22.47261620,6.70397949,0,0,150000); //Trailer 3 thidden[9] = CreateVehicle(591,-2258.96191406,-1693.13671875,481.28280640,44.41772461,0,0,150000); //Trailer 3 thidden[10] = CreateVehicle(591,-1941.93469238,-1080.12377930,31.47755241,354.79162598,0,0,150000); //Trailer 3 thidden[11] = CreateVehicle(591,-2377.48730469,-570.46386719,130.21121216,50.36682129,0,0,150000); //Trailer 3 thidden[12] = CreateVehicle(591,-2107.27148438,982.73730469,72.21530151,354.78698730,0,0,150000); //Trailer 3 thidden[13] = CreateVehicle(591,-2505.00781250,1162.33300781,55.98873901,90.37902832,0,0,150000); //Trailer 3 thidden[14] = CreateVehicle(591,-2625.48974609,2254.78857422,8.84631538,0.00000000,0,0,150000); //Trailer 3 thidden[15] = CreateVehicle(591,554.62280273,2886.27734375,4.92820978,100.33489990,0,0,150000); //Trailer 3 thidden[16] = CreateVehicle(591,-732.79101562,2896.36523438,41.72669601,167.36572266,0,0,150000); //Trailer 3 thidden[17] = CreateVehicle(591,-711.55273438,2327.66015625,127.93330383,320.75134277,0,0,150000); //Trailer 3 thidden[18] = CreateVehicle(591,2894.24316406,1613.18908691,11.51998711,1.13208008,0,0,150000); //Trailer 3 thidden[19] = CreateVehicle(591,1428.05957031,2816.85546875,11.51998711,301.58020020,0,0,150000); //Trailer 3 thidden[20] = CreateVehicle(591,1333.29675293,1644.08947754,11.51998711,1.13159180,0,0,150000); //Trailer 3 thidden[21] = CreateVehicle(591,1048.11926270,1354.99621582,11.51998711,269.41662598,0,0,150000); //Trailer 3 thidden[22] = CreateVehicle(591,593.40454102,902.22967529,-44.05310822,269.41223145,0,0,150000); //Trailer 3 thidden[23] = CreateVehicle(591,151.83856201,1828.10803223,18.34773254,269.41223145,0,0,150000); //Trailer 3 thidden[24] = CreateVehicle(591,125.48730469,1339.46386719,11.28561211,269.41223145,0,0,150000); //Trailer 3
forward HiddenTrailerMissions(playerid); public HiddenTrailerMissions(playerid) { if (GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == 591) { new message[100]; SetPlayerCheckpoint(playerid, -1073.4313, -1306.4890, 129.2188, 10); SendClientMessage(playerid, HIDDEN, "You have found a hidden trailer!"); SendClientMessage(playerid, HIDDEN, "Deliver it to 'The Den'"); format(message,sizeof(message), "~w~Deliver the ~y~hidden trailer ~w~to ~r~the den"); PlayerTextDrawSetString(playerid, work[playerid], message); print("CALL 1"); onCheck[playerid] = true; HiddenTrailer_PlayerJob[playerid] = 1; KillTimer(htimer); } return 1; }
You need to do a for loop checking that the trailer is actually in thidden[], rather than simply going off the model of the trailer.
If you're only going to use the model, then all the thidden[] is a waste. A better way to actually do this, would be using foreach, and its iterators. |