Creating cars on a command -
nmader - 29.11.2011
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
Re: Creating cars on a command -
sleepysnowflake - 29.11.2011
Can you just tell me what are you trying to do ?
Re: Creating cars on a command -
nmader - 29.11.2011
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.)
Re: Creating cars on a command -
Thresholdold - 30.11.2011
Instead of having the -1,-1 try replacing them with 0...
if that doesn't work, tell me.
Re: Creating cars on a command -
Thresholdold - 30.11.2011
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;
}
Re: Creating cars on a command -
JamesC - 30.11.2011
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.
Re: Creating cars on a command -
Thresholdold - 30.11.2011
Works for me...