14.04.2016, 15:37
OnPlayerConnect
Код:
INI_ParseFile(UserPath(playerid), "BanLoad_%s", .bExtra = true, .extra = playerid); if(fexist(UserPath(playerid))) { if(pInfo[playerid][pIsBan] == 1) { SendClientMessage(playerid,0xFF0000FF,"Banned, Good Byy); SetTimerEx("Kicksz",20,false,"d",playerid); return 1; } INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login","{09B086}Type your password below to login.","Login","Quit"); } else { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"REGISTER","{09B086}asdffadsfadf.","Register","Quit"); }
Код:
forward BanLoad_data(playerid,name[],value[]); public BanLoad_data(playerid,name[],value[]) { INI_Int("Banned",pInfo[playerid][pIsBan]); return 1; } forward Kicksz(playerid); public Kicksz(playerid) { Kick(playerid); return 1; }