Weird problem, probly easy to fix
#1

hi

here is my problem

i want to be able to type a command and it creates vehicles.
here is what i have

Quote:

if(strcmp(cmd, "/starttoraincars12345", true) == 0) {
CreateVehicle(418,3222.9365,-2053.7864,3.1010,272.9518,116); // car rain
CreateVehicle(418,3260.6118,-2051.8401,68.6394,272.9518,116); // car rain
CreateVehicle(418,3200.0708,-2054.9622,68.5812,272.9518,116); // car rain
CreateVehicle(418,3226.7542,-2075.4500,68.6059,272.9518,116); // car rain
CreateVehicle(418,3237.9895,-2036.3240,68.6185,272.9518,116); // car rain
CreateVehicle(418,3228.2136,-2055.4399,68.6082,272.9518,116); // car rain
CreateVehicle(418,3229.6807,-2083.8984,68.6082,272.9518,116); // car rain
CreateVehicle(418,3228.3757,-2059.9358,140.9471,272.9518,116); // car rain
CreateVehicle(418,3226.8669,-2030.6758,140.9471,272.9518,116); // car rain
CreateVehicle(418,3228.8677,-2069.4841,140.9471,272.9518,116); // car rain
CreateVehicle(588,3256.6221,-2056.8618,127.6822,272.9518,123); // car rain
CreateVehicle(588,3211.1174,-2059.2080,127.6822,272.9518,123); // car rain
CreateVehicle(588,3239.3953,-2084.4526,127.6822,272.9518,123); // car rain
CreateVehicle(588,3236.6289,-2030.7892,127.6822,272.9518,123); // car rain
CreateVehicle(588,3254.6938,-2050.9749,127.6822,272.9518,123); // car rain
CreateVehicle(588,3215.5166,-2052.9944,127.6822,272.9518,123); // car rain
CreateVehicle(422,3217.0564,-2050.1719,227.1472,272.9518,123); // car rain
CreateVehicle(422,3237.8750,-2049.0986,227.1667,272.9518,123); // car rain
CreateVehicle(422,3238.7825,-2066.6882,227.1667,272.9518,123); // car rain
CreateVehicle(422,3230.1294,-2067.1345,227.1586,272.9518,123); // car rain
CreateVehicle(422,3229.3071,-2051.1743,227.1586,272.9518,123); // car rain
CreateVehicle(422,3229.3474,-2051.1733,184.7313,272.9518,123); // car rain
CreateVehicle(422,3253.3999,-2049.9326,184.7539,272.9518,123); // car rain
CreateVehicle(422,3252.3691,-2029.9425,184.7539,272.9518,123); // car rain
CreateVehicle(422,3253.6013,-2053.8279,184.7539,272.9518,123); // car rain
CreateVehicle(475,3221.5930,-2044.7352,154.5444,101.5914,6); // car rain
CreateVehicle(475,3228.0327,-2076.4067,155.9437,101.5914,6); // car rain
CreateVehicle(475,3233.8193,-2035.3397,154.8054,101.5914,6); // car rain
CreateVehicle(475,3214.5293,-2039.2964,154.0191,101.5914,6); // car rain
CreateVehicle(475,3220.4934,-2068.6357,155.3154,101.5914,6); // car rain
CreateVehicle(475,3248.6541,-2062.8594,156.4632,101.5914,6); // car rain


return 1;
}

Am i doing it right?
Reply
#2

Did you try if it works? What is the problem with it?

The command seems to be ok, but probably you messed sth up with the OnPlayerCommandText - Variables like cmdtext, cmd, etc
Reply
#3

No you do it wrong,

Look at your code, then look at the right syntaxes.

pawn Код:
CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay);
You filled in

pawn Код:
CreateVehicle(modelid, posX, posY, posZ, Angle, ?respawn?);
You forgot color, other than that it should work

Edit, although I think it should work as it would probaly fill the missing numbers in with zero.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)