[Help] Spawning a Vehicle with zcmd and sscanf2
#4

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
Код:
if(idcarro < 400 || idcarro > 612)
I changed that and tryed the GM, but, it stills don't work, i will explain:

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;
}
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.
Reply


Messages In This Thread
[Help] Spawning a Vehicle with zcmd and sscanf2 - by MacacoDoArtico - 13.08.2014, 12:36
Re: [Help] Spawning a Vehicle with zcmd and sscanf2 - by MacacoDoArtico - 13.08.2014, 12:56
Re: [Help] Spawning a Vehicle with zcmd and sscanf2 - by Abagail - 13.08.2014, 12:58
Re: [Help] Spawning a Vehicle with zcmd and sscanf2 - by MacacoDoArtico - 13.08.2014, 13:41
Re: [Help] Spawning a Vehicle with zcmd and sscanf2 - by MacacoDoArtico - 13.08.2014, 22:05

Forum Jump:


Users browsing this thread: 1 Guest(s)