[HELP]NumberPlate - 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]NumberPlate (
/showthread.php?tid=207313)
[HELP]NumberPlate -
lazare13 - 05.01.2011
Can you help NumberPlate How to set up and remember that?
Sorry I do not know English well
Re: [HELP]NumberPlate -
Moglizorz. - 05.01.2011
Search around, plenty of posts.
Re: [HELP]NumberPlate -
blackwave - 05.01.2011
Quote:
Originally Posted by lazare13
Can you help NumberPlate How to set up and remember that?
Sorry I do not know English well
|
Using dcmd ( command of set number plate which I use )
ADD THIS ON THE TOP
Quote:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
|
On public OnPlayerCommandText callback, add this line:
On the script end:
pawn Код:
dcmd_plate(playerid,params[])
{
new ID = GetPlayerVehicleID(playerid);
new string[128];
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, azul, "You're not in a vehicle");
if(!strlen(params)) return SendClientMessage(playerid, azul, "Usage: /plate <number/name>");
else
{
SetVehicleNumberPlate(ID, params);
SetVehicleToRespawn(ID);
format(string,sizeof(string),"{F216FA}You've changed your{00EEFF} VehicleID: {D9FA00}%d {FAD900}plate's for: {00FF88}%s",GetVehicleModel(ID),params);
SendClientMessage(playerid, vermelho, string);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
}
return 1;
}
ChanGe colors for yours.
Re: [HELP]NumberPlate -
lazare13 - 05.01.2011
Quote:
Originally Posted by blackwave
Using dcmd ( command of set number plate which I use )
ADD THIS ON THE TOP
On public OnPlayerCommandText callback, add this line:
On the script end:
pawn Код:
dcmd_plate(playerid,params[]) { new ID = GetPlayerVehicleID(playerid); new string[128]; if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, azul, "You're not in a vehicle"); if(!strlen(params)) return SendClientMessage(playerid, azul, "Usage: /plate <number/name>"); else { SetVehicleNumberPlate(ID, params); SetVehicleToRespawn(ID); format(string,sizeof(string),"{F216FA}You've changed your{00EEFF} VehicleID: {D9FA00}%d {FAD900}plate's for: {00FF88}%s",GetVehicleModel(ID),params); SendClientMessage(playerid, vermelho, string); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } return 1; }
ChanGe colors for yours.
|
thanks