Creating cars on a command
#1

Hello once again,

I am actaully trying to make certain vehicles appear on a command, /sunload, because you cannot use MoveObject on vehicles. Here is my pawn code, but It doesn't seem to be working.

pawn Код:
if (!strcmp("/sunload", cmdtext))
    {
        CreateVehicle(428, -5400.6260, 1787.1687, 7.1258, 0.0000, -1, -1, 100);
        CreateVehicle(428, -5404.0386, 1794.8119, 7.1258, 0.0000, -1, -1, 100);
        CreateVehicle(428, -5400.5342, 1794.7540, 7.1258, 0.0000, -1, -1, 100);
        CreateVehicle(428, -5403.9707, 1787.1770, 7.1258, 0.0000, -1, -1, 100);
        return 1;
    }
It should be simple, I am aware, but I tested my script and it didn't load the vehicles.

Help is appreciated!
-nmader
Reply
#2

Can you just tell me what are you trying to do ?
Reply
#3

Well, for my RP server, I am having a shipment begin, after so long it arrives at the correct location, a player can then /sunload to get the shipment secure cars. (It is basic for now, as I plan to ease my way into more difficult scripting.)
Reply
#4

Instead of having the -1,-1 try replacing them with 0...
if that doesn't work, tell me.
Reply
#5

Or try using:
Код:
if(strcmp(cmdtext, "/sunload", true) == 0)
{        
CreateVehicle(428, -5400.6260, 1787.1687, 7.1258, 0.0000, 0.0, 0.0, 100);        
CreateVehicle(428, -5404.0386, 1794.8119, 7.1258, 0.0000, 0.0, 0.0, 100);        
CreateVehicle(428, -5400.5342, 1794.7540, 7.1258, 0.0000, 0.0, 0.0, 100);        
CreateVehicle(428, -5403.9707, 1787.1770, 7.1258, 0.0000, 0.0, 0.0, 100);        
return 1;    
}
Reply
#6

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Or try using:
Код:
if(strcmp(cmdtext, "/sunload", true) == 0)
retardedness....
Have you even read the syntax for CreateVehicle? You cannot change an integer value into a float and expect everything to work. Help yourself before you help others.

@OP: Please clearly explain what you want to do with the spawned cars.
Reply
#7

Works for me...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)