Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function CheckClassIP(playerid) {
- new query[180], playerserial[128];
- gpci(playerid,playerserial,sizeof(playerserial));
- format(query, sizeof(query), "SELECT * FROM `ipbans` WHERE `Serial`='%s'", playerserial);
- new Cache: result = mysql_query(SQL, query);
- new test = cache_get_row_count ();
- if(test != 0) {
- new string[180], name[MAX_PLAYER_NAME], by[MAX_PLAYER_NAME], date[100], reason[64];
- cache_get_field_content(0, "Name", name);
- cache_get_field_content(0, "By", by);
- cache_get_field_content(0, "Date", date);
- cache_get_field_content(0, "Reason", reason);
- for( new j = 0; j <= 100; j++) SendClientMessage(playerid, COLOR_WHITE, "");
- format(string, sizeof(string), "Acest cont este banat permanent pe IP de %s de pe %s!", by, date);
- SCM(playerid, COLOR_WARNING, string);
- format(string, sizeof(string), "Contul pe care s-a luat ban este %s.", name);
- SCM(playerid, COLOR_CLIENT, string);
- format(string, sizeof(string), "Motivul: %s", reason);
- SCM(playerid, COLOR_CLIENT, string);
- format(string, sizeof(string), "Daca consideri ca ai primit ban aiurea, fa o cerere de unban pe burned.ro/panel/unbans!", reason);
- SCM(playerid, COLOR_CLIENT, string);
- SetPlayerCameraPos(playerid, 1183.0143, -965.7394, 129.6071);
- SetPlayerCameraLookAt(playerid, 1183.7214, -965.0270, 129.2470);
- TogglePlayerSpectating(playerid, 0);
- KickEx(playerid);
- }
- else {
- GameTextForPlayer(playerid, " ", 1000, 4);
- new string[180];
- if(RegistrationStep[playerid] == 0 && IsPlayerLogged[playerid] != 1) {
- SetPlayerFacingAngle(playerid, 3.41);
- SetPlayerPosEx(playerid, 1479.3499, -1748.4355, 45.1615);
- SetPlayerInterior(playerid, 0);
- TogglePlayerControllable(playerid, 0);
- if(PlayerAccount[playerid] != 0) {
- new laston[64], field[128];
- format(field,128,"SELECT `lastOn` FROM users WHERE `name`='%s'",GetName(playerid));
- mysql_query(SQL,field);
- mysql_store_result();
- if(mysql_retrieve_row()) mysql_fetch_field_row(laston, "lastOn");
- mysql_free_result();
- format(string, sizeof(string), "Bine ai revenit, %s!\nTasteaza in casuta de mai jos parola contului tau.\n\nUltima logare: {FFFFFF}%s",GetName(playerid),laston);
- ShowPlayerDialog(playerid, DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD,"Logare", string,"Logare","Quit");
- }
- else {
- PlayerAccount[playerid] = 0;
- format(string, sizeof(string), "Bine ai venit, %s!\nAcest cont nu este inregistrat.\n\nPentru a-ti creea unul, introdu o parola in casuta de mai jos.",GetName(playerid));
- ShowPlayerDialog(playerid, DIALOG_LOGIN1,DIALOG_STYLE_PASSWORD,"Register", string,"Register","Quit");
- }
- }
- }
- cache_delete(result);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement