Untitled
unknown
plain_text
a year ago
1.8 kB
3
Indexable
Never
// tìm : enum pinfo ActiveAccount, // tìm : gun%d cache_get_field_content(row, "ActiveAccount", szResult, MainPipeline); PlayerInfo[extraid][ActiveAccount] = strval(szResult); // tìm : gun11 SavePlayerInteger(query, GetPlayerSQLId(playerid), "ActiveAccount", PlayerInfo[playerid][ActiveAccount]); // tìm : public OnPlayerSpawn(playerid) if(PlayerInfo[playerid][ActiveAccount] == 0) { new str[2460]; format(str, sizeof(str), "{ffffff}Xin chao {FF1818}%s{ffffff}, tai khoan cua ban hien tai chua duoc kich hoat, vui long lien he Admin (Hau) de duoc kich hoat tai khoan.", GetPlayerNameEx( playerid )); ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Kick hoat tai khoan", str, "Dong Lai", ""); SetTimerEx("KickEx", 1000, 0, "i", playerid); return 1; } CMD:kichhoattk(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 9999) return 0; new string[128], playername[MAX_PLAYER_NAME]; if(sscanf(params, "s[24]", playername)) return SendClientMessageEx(playerid, COLOR_WHITE, "SU DUNG: /kichhoattk [Player Name]"); new giveplayerid = ReturnUser(playername); if(IsPlayerConnected(giveplayerid)) { SendClientMessageToAllEx(COLOR_LIGHTRED, "{ff0000}[!]{FFFFFF} Nguoi choi nay dang online trong may chu, khong the kich hoat duoc."); return 1; } else { new query[128], tmpName[24]; mysql_escape_string(playername, tmpName); format(query, sizeof(query), "UPDATE `accounts` SET `ActiveAccount`=1 WHERE `Username`='%s'", tmpName); mysql_function_query(MainPipeline, query, false, "OfflineTake", "i", playerid); format(string,sizeof(string),"Ban da kich hoat tai khoan %s thanh cong...", tmpName); SendClientMessageEx(playerid, COLOR_YELLOW, string); } return 1; }