24.01.2013, 04:07
Best register/login system tutorial, thanks!
if(!strcmp(cmd, "/makeadmin", true)) { //if(Bit16_Get(g_AdminLevel, playerid) < 1) return true; new giveplayerid, id; if (sscanf(params,"ui", giveplayerid, id)) return SendClientMessage(playerid, 0xFF0000AA ," /makeadmin [playerid] [lvl]"); if( id < 0 || id > 5 ) return SendClientMessage( playerid, -1, "0 - 5 ); if( Bit16_Get( g_AdminLevel, giveplayerid ) == id ) return SendClientMessage( playerid, -1, "Already this level" ); { Bit16_Set(g_AdminLevel, giveplayerid, id); } return true; }
new Field[ 20 ]; //Creating a field to retrieve the data
// get the field "SCORE"'s value and insert it to Field itself.
db_get_field_assoc(Result, "SCORE", Field, 30);