SA-MP Forums Archive
Vmdc - 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: Vmdc (/showthread.php?tid=641707)



Vmdc - Cubie - 19.09.2017

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.