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;
}