how to change car number plate? - 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: how to change car number plate? (
/showthread.php?tid=74387)
how to change car number plate? -
WardenCS - 22.04.2009
can someone make me command like that? or tell me how,i would like like that /changeplate (carid) it will be for admins only..please?
Re: how to change car number plate? -
MenaceX^ - 22.04.2009
pawn Код:
if(!strcmp(cmd,"/changeplate",true))
{
new string[64];
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid,0xFFFFFFAA,"You are not authorized to use this command.");
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid,0xFFFFFFAA,"You have to be inside a vehicle.");
if(cmdtext[idx++] != 32 || cmdtext[idx] == EOS)
return SendClientMessage(playerid,0xFFFFFFAA,"USAGE: /changeplate [newplate]");
format(string,sizeof(string),"%s",cmdtext[idx]);
return SetVehicleNumberPlate(GetPlayerVehicleID(playerid),string);
}
It should work, I guess, though I had never worked with this before.
Re: how to change car number plate? -
WardenCS - 22.04.2009
it will say You are not authorized to use this command. but im admin...
now it when i /changeplate it says usage: /changeplate [newplate]
Re: how to change car number plate? -
ICECOLDKILLAK8 - 22.04.2009
Quote:
Originally Posted by WardenCS
it will say You are not authorized to use this command. but im admin...
|
You have to be an RCON Admin
Re: how to change car number plate? -
WardenCS - 22.04.2009
now it when i /changeplate lala it says usage: /changeplate [newplate]
Re: how to change car number plate? -
ICECOLDKILLAK8 - 22.04.2009
Quote:
Originally Posted by WardenCS
now it when i /changeplate it says usage: /changeplate [newplate]
|
You have to specify what you want the plate to say...
Re: how to change car number plate? -
WardenCS - 22.04.2009
yea i did but still
Re: how to change car number plate? -
MenaceX^ - 22.04.2009
Dunno, it should work, I guess.
Re: how to change car number plate? -
WardenCS - 22.04.2009
any help?
Re: how to change car number plate? -
ICECOLDKILLAK8 - 22.04.2009
Try using it with strtok
pawn Код:
if(!strcmp(cmd,"/changeplate",true))
{
new idx;
new plate[8];
plate = strtok(cmdtext,idx);
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid,0xFFFFFFAA,"You are not authorized to use this command.");
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid,0xFFFFFFAA,"You have to be inside a vehicle.");
if(!strlen(plate))
return SendClientMessage(playerid,0xFFFFFFAA,"USAGE: /changeplate [newplate]");
return SetVehicleNumberPlate(GetPlayerVehicleID(playerid),plate);
}