SA-MP Forums Archive
A little help!!! - 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: A little help!!! (/showthread.php?tid=640948)



A little help!!! - CMH - 09.09.2017

Hello.
I want to make a code system.
That is, when a player registers, it generates a rendering code that another player can use to use it.
The question is how to look for the code in the database ... that is, to find that code in the entire list of players and to check if it matches the one entered by the player.

A small example would be helpful ...

I tried that
Quote:

mysql_format(g_SQL, query, sizeof query, "SELECT `Cod` FROM `players` WHERE %s",inputtext);

for(new i = 0; i < MAX_PLAYERS; i++)
{
cache_get_value_int(i, "Cod", string);
//if(inputtext == string)
if(!strcmp(string, inputtext))
{
Mesaj("No correct code.");
}
else
{

}
}




Re: A little help!!! - JasonRiggs - 09.09.2017

totally understood nothing, can you tell us the concept from what are you doing, and tell us what exactly are you trying to do??