08.09.2011, 20:19
Код:
public OnPlayerConnect(playerid) { new string[256]; new targetid; new pTargetName[24]; new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,24); GetPlayerName(targetid,pTargetName,24); new file2[128],ip[16]; GetPlayerIp(playerid,ip,16); format(file2,sizeof(file2),"User_Database/Logs/Bans/%s.ini",ip); if(fexist(file2)) { new Admin1[48], Reason[128]; new INI:handler = INI_Open(file2); INI_String("Admin", Admin1, 48); INI_String("Reason", Reason, 128); format(string,sizeof(string),""COL_RED"\t\tAccount "COL_YELLOW"\"%s\""COL_RED"Since Your Banned We Would Like You To Read These Following Details!\nYour name: %s \nAdmin name: %s \nReason: %s \nYour IP Address: %s",pTargetName,pName,Admin1,Reason,ip); ShowPlayerDialog(playerid,9,DIALOG_STYLE_MSGBOX,""COL_RED"BANNED",string,"OK",""); INI_Close(handler); Kick(playerid); return 1; } }