SA-MP Forums Archive
[Help] Commands - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Commands (/showthread.php?tid=97786)



[Help] Commands - Mochi15 - 16.09.2009

How To Add Cmds like /changeplate /rainbow /wheels(change Wheels) and more for cars


Thanks


Re: [Help] Commands - almighty - 16.09.2009

if you know how to make commands here should be all you need https://sampwiki.blast.hk/wiki/Category:Scripting_Functions
try with AddVehicleComponent


Re: [Help] Commands - tony_fitto - 17.09.2009

Код:
if (strcmp(cmd, "/changeplate", true, 12)==0)
	{
	  cmd = strtok(cmdtext, idx);
		if(!strlen(cmd))
		{
	    SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /platechange [platenumber (up to 8 chars, use '-' for space char)]");
			return 1;
	  }
  		if(IsPlayerInAnyVehicle(playerid) == 1)
		  {
		  SetVehicleNumberPlate(GetPlayerVehicleID(playerid), cmd);
		  new vehid=GetPlayerVehicleID(playerid);
		  SetVehicleToRespawn(vehid);
		  SendClientMessage(playerid, 0xFF9900AA, "License plate changed!");
		  new Float:x;
		  new Float:y;
		  new Float:z;
		  GetPlayerPos(playerid, x, y, z);
		  //Wait(500);              //added this line so the car will change POS after spawning.
		  SetVehiclePos(vehid, x, y, z+2);
		  //GameTextForPlayer(playerid, cmd, 2500, 3);
		  return 1;
		 }
				else
				{
				  SendClientMessage(playerid, 0xFF9900AA, "You are not in a vehicle.");
				}
	  return 1;
	}