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



How? - Fernado - 14.09.2012

how can i convert this command to MySQL? i have all the functions of mysql working fine but dont know how to convert this

pawn Код:
CMD:sethg(playerid,params[])
{
    if(PlayerInfo[playerid][Level] >= 10) {
    new player1, string[128],dsname[MAX_PLAYER_NAME];
    if(sscanf(params,"i",player1)) return SendClientMessage(playerid, red, "USAGE: /sethg [playerid]");
    if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, red, "ERROR: Player is not connected");
   
    if(udb_Exists(PlayerName2(player1)) && PlayerInfo[player1][LoggedIn] == 1) dUserSetINT(PlayerName2(player1)).("NG",1);

    GetPlayerName(player1, dsname, sizeof(dsname));
    format(string, sizeof(string), "You have given ng Membership to %s ",dsname);
    SendClientMessage(playerid,yellow, string);
    GetPlayerName(player1, dsname, sizeof(dsname));
    format(string, sizeof(string), "* Player %s got promoted to a hg Member.",dsname);
    SendClientMessageToAll(0x32CD32AA, string);
    }
    else {
    SendClientMessage(playerid,-1,"You must be a admin.");
    return 1;
}
I think this should be converted, right?
pawn Код:
if(udb_Exists(PlayerName2(player1)) && PlayerInfo[player1][LoggedIn] == 1) dUserSetINT(PlayerName2(player1)).("NG",1);



Re: How? - Fernado - 14.09.2012

bump