SA-MP Forums Archive
Help with /changeplate. - 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 with /changeplate. (/showthread.php?tid=162119)



Help with /changeplate. - GaB1TzZzu - 22.07.2010

Код:
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;
	}
This is my script for change cars plate. But this don't work. I have script who add 3dText like "LS-02-GOV" , and if i get second time /regplate LS-99-GAB, this plate overlap LS-02-GOV.

I need a script like /changeplate to work. Thanks a lot!


Re: Help with /changeplate. - Mystique - 22.07.2010

Are you using SA-MP 0.3? Because the SetVehicleNumberPlate function was removed in SA-MP 0.3..


Re: Help with /changeplate. - Mike_Peterson - 22.07.2010

Lol yeah, too bad though


Re: Help with /changeplate. - Яσскѕтая - 22.07.2010

*Rockstar wonders why they removed it.


Re: Help with /changeplate. - GaB1TzZzu - 22.07.2010

I use 0.3 and Moderntopia GM.

Can someone help me?


Re: Help with /changeplate. - ettans - 22.07.2010

About the 3DText overlapping, make sure you first destroy the 3DText and THEN create it.


Re: Help with /changeplate. - GaB1TzZzu - 22.07.2010

I don't know nothing about 3DText, if you can make me a little script, thanks.


Re: Help with /changeplate. - GaB1TzZzu - 22.07.2010

Can someone help me?


Re: Help with /changeplate. - GaB1TzZzu - 23.07.2010

Look here, please.


Re: Help with /changeplate. - MisterTickle - 23.07.2010

Quote:
Originally Posted by Яσскѕтая
Посмотреть сообщение
*Rockstar wonders why they removed it.
It was buggy for multiple models or something like that, Its been discussed before. Shame.