[Help] Commands
#1

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


Thanks
Reply
#2

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

Код:
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;
	}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)