#1

This command is from the Scratch RP script but I cannot get it to work.
When you enter the license plate it will always send the: "there is not player with that license plate" line.

PHP код:
CMD:vmdc(playeridparams[])
{
    new 
platestring[128];
    if(
sscanf(params"d"plate)) return SendClientMessage(playeridCOLOR_GREY"[Usage:] /vmdc [plate].");
    if(
PlayerInfo[playerid][pFaction] != 2) return SCM(playeridCOLOR_LIGHTRED"You are not a police officer.");
    foreach(
Player,i)
    {
        if(
plate == PlayerInfo[i][pPlate1] || plate == PlayerInfo[i][pPlate2] || plate == PlayerInfo[i][pPlate3])
        {
            
format(stringsizeof(string),"_______________________________[BS-%d]_______________________________"plate);
            
SCM(playeridCOLOR_WHITEstring);
            
format(stringsizeof(string), "[Vehicle Owner:] "COL_WHITE"%s."PlayerInfo[i][pName]);
            
SCM(playeridCOLOR_BSSDstring);
        }
        else return 
SCM(playeridCOLOR_LIGHTRED"There is no player with that license plate.");
    }
      return 
1;

Player Info:
PHP код:
Plate1 105892
Plate2 
0
Plate3 

So If I for example would do /vmdc 105892 it would still tell me there is no player with that plate.
If anybody knows how to solve this you'd help me bigtime!
Thanks in advance.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)