AttachObject
#1

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 0MAX_PLAYERSi++)
                    {
                                                                if(
IsACopCar(newcar))
                    {
                    new 
objectid CreateObject(19311);
                    new 
newcar GetPlayerVehicleID(i);
                    
AttachObjectToVehicle(19311newcar0.00.01.00.00.00.0);
                    return 
1;
                    }
                    } 
Reply
#2

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
Reply
#3

thanks could someone help me with the rest of code please!
Reply
#4

someone please?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)