13.08.2014, 13:41
yes, you understood correctly,it was that.
Before, it didn't do nothing when I typed "/spawn", it was because I had the erro in
I changed that and tryed the GM, but, it stills don't work, i will explain:
This is the code translated to English:
Now, when I type "/spawn" it says "You spawned a Drive safely!" and when I type "/spawn 559 1 1" that, it was supposed to spawns a Jester with color1 - 1 and color2 - 1, it says "Use: /spawn [VehicleID/CarName] [Color1] [Color2]
If you didn't understand something, please ask.
Before, it didn't do nothing when I typed "/spawn", it was because I had the erro in
Код:
if(idcarro < 400 || idcarro > 612)
This is the code translated to English:
Код:
CMD:spawn(playerid, params[]) { new carid, color1, color2; if (sscanf(params, "iii", carid, color1, color2)) { if(carid < 400 || carid > 612) { new message[40], Float:x, Float:y, Float:z, Float:a; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); format(message, sizeof(message), "You spawned a %s, Drive safely!", carid); new vehicleid = CreateVehicle(carid, x+3, y, z, a, color1, color2, 0); PutPlayerInVehicle(playerid, vehicleid, 0); SendClientMessage(playerid, 0xFF0000FF, message); } else SendClientMessage(playerid, 0xFFFFFFFF, "Use:"COL_NICERED"/spawn [VehicleID/CarName] [Corlor1] [Color2]"); } return 1; }
If you didn't understand something, please ask.