[Help]License 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)
+--- Thread: [Help]License Plate (
/showthread.php?tid=318099)
[Help]License Plate -
Nuke547 - 13.02.2012
The problem is that it only makes the license plate the first letter of whatever you type in.
This is the code so it takes affect
PHP код:
SetVehicleNumberPlate(Player[playerid][Car2LinkID], Player[playerid][CarPlate2]);
It basically does that for 1-5.
This is how it is set.
PHP код:
command(setplate, playerid, params[])
{
new plate, vehslot, string[126];
if(sscanf(params, "ci", plate, vehslot))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /setplate [Plate Name] [Car Slot]");
}
else
{
switch(vehslot)
{
case 1:
{
Player[playerid][CarPlate] = plate;
format(string, sizeof(string), "You have set your license plate to %s", plate);
SendClientMessage(playerid, WHITE, string);
}
case 2:
{
Player[playerid][CarPlate2] = plate;
format(string, sizeof(string), "You have set your license plate to %s", plate);
SendClientMessage(playerid, WHITE, string);
}
case 3:
{
Player[playerid][CarPlate3] = plate;
format(string, sizeof(string), "You have set your license plate to %s", plate);
SendClientMessage(playerid, WHITE, string);
}
case 4:
{
Player[playerid][CarPlate4] = plate;
format(string, sizeof(string), "You have set your license plate to %s", plate);
SendClientMessage(playerid, WHITE, string);
}
case 5:
{
Player[playerid][CarPlate5] = plate;
format(string, sizeof(string), "You have set your license plate to %s", plate);
SendClientMessage(playerid, WHITE, string);
}
}
}
return 1;
}
Re: [Help]License Plate -
Cameltoe - 13.02.2012
What does
format(string, sizeof(string), "You have set your license plate to %s", plate);
SendClientMessage(playerid, WHITE, string);
Say to the client?
Though i think the problem is here:
pawn Код:
new plate[6], vehslot, string[126];
if(sscanf(params, "s[6]i", plate, vehslot))