[Help]License Plate
#1

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(setplateplayeridparams[])
{
    new 
platevehslotstring[126];
    if(
sscanf(params"ci"platevehslot))
    {
        
SendClientMessage(playeridWHITE"SYNTAX: /setplate [Plate Name] [Car Slot]");
    }
    else
    {
        switch(
vehslot)
        {
            case 
1:
            {
                
Player[playerid][CarPlate] = plate;
                
format(stringsizeof(string), "You have set your license plate to %s"plate);
                
SendClientMessage(playeridWHITEstring);
            }
            case 
2:
            {
                
Player[playerid][CarPlate2] = plate;
                
format(stringsizeof(string), "You have set your license plate to %s"plate);
                
SendClientMessage(playeridWHITEstring);
            }
            case 
3:
            {
                
Player[playerid][CarPlate3] = plate;
                
format(stringsizeof(string), "You have set your license plate to %s"plate);
                
SendClientMessage(playeridWHITEstring);
            }
            case 
4:
            {
                
Player[playerid][CarPlate4] = plate;
                
format(stringsizeof(string), "You have set your license plate to %s"plate);
                
SendClientMessage(playeridWHITEstring);
            }
            case 
5:
            {
                
Player[playerid][CarPlate5] = plate;
                
format(stringsizeof(string), "You have set your license plate to %s"plate);
                
SendClientMessage(playeridWHITEstring);
            }
        }
    }
    return 
1;

Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)