Random Plates
#7

I can't get the layout right, I'm not sure how it's meant to be layed out and I've tried looking at some posts on the SAMP forums but I can't understand them that well as it takes me a bit to actually click in my head how the layout should work etc.

This is what I put:
pawn Код:
stock GetRandomPlate()
{
    new string[128];
    format(string, sizeof(string), "%d%s%s%s%d%d%d", random(10), LetterList[random(sizeof(LetterList))], LetterList[random(sizeof(LetterList))], LetterList[random(sizeof(LetterList))], random(10), random(10), random(10));
    mysql_format(Mysql_users, GlobalQuery, sizeof(GlobalQuery), "SELECT * FROM `playervehicles` WHERE `Plate` = '%s'", string);
    new Cache:dbplate = mysql_query(Mysql_users, GlobalQuery);

    if(cache_is_valid(dbplate))
    {
        cache_delete(dbplate);
        GetRandomPlate();
    }
    return string;
}
Would that work or did I just get the layout of it all wrong? I'm still trying to learn how to use the R40 version as before it came out I was using an older version and it's trying to learn all the new features that replaced all the old ones.
Reply


Messages In This Thread
Random Plates - by McGuiness - 11.05.2017, 21:39
Re: Random Plates - by Jefff - 11.05.2017, 23:24
Re: Random Plates - by Vince - 12.05.2017, 05:41
Re: Random Plates - by McGuiness - 12.05.2017, 11:03
Re: Random Plates - by McGuiness - 12.05.2017, 23:17
Re: Random Plates - by Tord - 13.05.2017, 10:21
Re: Random Plates - by McGuiness - 13.05.2017, 21:04
Re: Random Plates - by Jefff - 13.05.2017, 22:02
Re: Random Plates - by McGuiness - 13.05.2017, 22:05
Re: Random Plates - by Jefff - 13.05.2017, 22:07

Forum Jump:


Users browsing this thread: 1 Guest(s)