Help with /changeplate.
#1

Код:
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!
Reply
#2

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

Lol yeah, too bad though
Reply
#4

*Rockstar wonders why they removed it.
Reply
#5

I use 0.3 and Moderntopia GM.

Can someone help me?
Reply
#6

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

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

Can someone help me?
Reply
#9

Look here, please.
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)