[Help] Commands
#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


Messages In This Thread
[Help] Commands - by Mochi15 - 16.09.2009, 18:38
Re: [Help] Commands - by almighty - 16.09.2009, 18:43
Re: [Help] Commands - by tony_fitto - 17.09.2009, 12:15

Forum Jump:


Users browsing this thread: 1 Guest(s)