AttachObject - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: AttachObject (
/showthread.php?tid=342502)
AttachObject -
Dan_Barocu - 13.05.2012
i made a thingy and i dont know how to attach that on all taxi vehicles..i want it to stay like normaly on taxi can someone help?
PHP код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsACopCar(newcar))
{
new objectid = CreateObject(19311);
new newcar = GetPlayerVehicleID(i);
AttachObjectToVehicle(19311, newcar, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
return 1;
}
}
Re: AttachObject -
FalconX - 13.05.2012
Okay, what you need to do is create the vehicles like this first:-
pawn Код:
//on top - change the max taxi limit to your own
#define MAX_TAXI (10)
new taxi[MAX_TAXI];
//now create them in the gamemodeinit
taxi[0] = AddStaticVehicle(...);
taxi[1] = AddStaticVehicle(...);
//and so on till your required number. Now what you have to do is make a loop:-
for(new f; f < MAX_TAXI; f++)
// and rest of the code.
This is what I've thought, would have provided the full code but sorry I am not on computer.
-FalconX
Re: AttachObject -
Dan_Barocu - 13.05.2012
thanks could someone help me with the rest of code please!
Re: AttachObject -
Dan_Barocu - 14.05.2012
someone please?