SA-MP Forums Archive
[Include] C-MySQL. (Advanced MySQL Account Configuration) - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] C-MySQL. (Advanced MySQL Account Configuration) (/showthread.php?tid=164733)

Pages: 1 2


Re: C-MySQL. (Advanced MySQL Account Configuration) - Carlton - 02.08.2010

pawn Код:
#define SetPlayerUserName(%0, %1) CMySQL_Set(%0, ACCOUNT_TABLE, "Username", "Username", %1);



Re: C-MySQL. (Advanced MySQL Account Configuration) - CJ101 - 03.08.2010

this is awesome, im goona use it!

pawn Код:
CMySQL_SetInt(name,ACCOUNT_TABLE,"Username","Deaths",GetPVarInt(playerid,"Deaths"));
        CMySQL_SetInt(name,ACCOUNT_TABLE,"Username","Kills",GetPVarInt(playerid,"Kills"));
        CMySQL_SetInt(name,ACCOUNT_TABLE,"Username","AdminLvl",GetPVarInt(playerid,"AdminLvl"));
        CMySQL_SetInt(name,ACCOUNT_TABLE,"Username","Color",GetPVarInt(playerid,"Color"));
        CMySQL_SetInt(name,ACCOUNT_TABLE,"Username","Skin",GetPVarInt(playerid,"Skin"));
um... what the hell is the Field (Username is for).. when im creating the database, i added the table (users), and there i add all the stats like deaths, kills, but what is the field?

:/


Re: C-MySQL. (Advanced MySQL Account Configuration) - Carlton - 03.08.2010

Quote:
Originally Posted by cj101
Посмотреть сообщение
this is awesome, im goona use it!

pawn Код:
CMySQL_SetInt(name,ACCOUNT_TABLE,"Username","Deaths",GetPVarInt(playerid,"Deaths"));
        CMySQL_SetInt(name,ACCOUNT_TABLE,"Username","Kills",GetPVarInt(playerid,"Kills"));
        CMySQL_SetInt(name,ACCOUNT_TABLE,"Username","AdminLvl",GetPVarInt(playerid,"AdminLvl"));
        CMySQL_SetInt(name,ACCOUNT_TABLE,"Username","Color",GetPVarInt(playerid,"Color"));
        CMySQL_SetInt(name,ACCOUNT_TABLE,"Username","Skin",GetPVarInt(playerid,"Skin"));
um... what the hell is the Field (Username is for).. when im creating the database, i added the table (users), and there i add all the stats like deaths, kills, but what is the field?

:/
Notice the query inside the function, it updates the value, when someone's 'Username' field is the first parameter, which in your case is name.


Re: C-MySQL. (Advanced MySQL Account Configuration) - StrickenKid - 03.08.2010

Nice Job.


Re: C-MySQL. (Advanced MySQL Account Configuration) - Kar - 03.08.2010

Quote:
Originally Posted by StrickenKid
Посмотреть сообщение
Nice Job.
Quote:
Originally Posted by Carlton
Посмотреть сообщение
pawn Код:
#define SetPlayerUserName(%0, %1) CMySQL_Set(%0, ACCOUNT_TABLE, "Username", "Username", %1);
i Luv YouD:@@!!#


Re: C-MySQL. (Advanced MySQL Account Configuration) - CJ101 - 03.08.2010

One more thing:

Код:
[03:05:12] MySQL Error (0): Could not execute query. Unknown column 'Name' in 'where clause'.
[03:05:12] MySQL Error (0): Function: 'mysql_store_result' called when no prior query executed.. Unknown column 'Name' in 'where clause'.
Код:
[12:27:14] [join] CJ101 has joined the server (0:xxx)
[12:27:21] MySQL Error (0): Could not execute query. Field 'IPAddress' doesn't have a default value.
[12:27:21] MySQL Error (0): Could not execute query. Unknown column 'CJ101' in 'where clause'.
[12:28:53] [part] CJ101 has left the server (0:1)



Re: C-MySQL. (Advanced MySQL Account Configuration) - [03]Garsino - 03.08.2010

Excellent work! I hope you don't mind if I take a look at how you script your MySql stuff, I'm a noob at this area :P


Re: C-MySQL. (Advanced MySQL Account Configuration) - Carlton - 03.08.2010

Quote:
Originally Posted by cj101
Посмотреть сообщение
One more thing:

Код:
[03:05:12] MySQL Error (0): Could not execute query. Unknown column 'Name' in 'where clause'.
[03:05:12] MySQL Error (0): Function: 'mysql_store_result' called when no prior query executed.. Unknown column 'Name' in 'where clause'.
Код:
[12:27:14] [join] CJ101 has joined the server (0:xxx)
[12:27:21] MySQL Error (0): Could not execute query. Field 'IPAddress' doesn't have a default value.
[12:27:21] MySQL Error (0): Could not execute query. Unknown column 'CJ101' in 'where clause'.
[12:28:53] [part] CJ101 has left the server (0:1)
In your MySQL database at the fields IPAddress & Name.


Re: C-MySQL 0.1 (Easy MySQL Account Configuration) - Carlton - 04.08.2010

Script updated, several functions added:

pawn Код:
native CMySQL_SetUserName(name[], AccountTable[], UserFieldName[], Value[]);
native CMySQL_SetBool(Username[], Table[], Field[], FieldValue[], bool:Value);



Re: C-MySQL. (Advanced MySQL Account Configuration) - Flyfishes - 04.08.2010

Cool! Really nice work


Re: C-MySQL. (Advanced MySQL Account Configuration) - Ben_Hatfield - 17.08.2012

btw, your links are dead


Re: C-MySQL. (Advanced MySQL Account Configuration) - TreePuncher - 17.08.2012

Did u even realised he is banned?


Re: C-MySQL. (Advanced MySQL Account Configuration) - Ballu Miaa - 18.08.2012

LOL Can someone mirror it please? Realcop?


Re: C-MySQL. (Advanced MySQL Account Configuration) - Mark™ - 18.08.2012

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
LOL Can someone mirror it please? Realcop?
Here : http://www.solidfiles.com/d/08f5fdc6e9/


Re: C-MySQL. (Advanced MySQL Account Configuration) - Edvin - 18.08.2012

Very nice and easy to use this include

Thanks, maybe I will use it