23.03.2015, 14:29
pawn Код:
//******************************-Banning System-****************************
if(dUserINT(PlayerName(playerid)).("Nameban") == 1)
{
new banned[800], bancheck[64];
format(bancheck, sizeof(bancheck),"el bans/%s.ban",PlayerName(playerid));
format(string,sizeof(string),"{FFFFFF}You are banned from this server.\n {FF8000}Do not think of ban evading, it will make the situation worse to your account, don't do it.\n");
strcat(banned, string);
format(string,sizeof(string),"{a9c4e4}Ban Information:\n");
strcat(banned, string);
format(string,sizeof(string),"{AFAFAF}Username: {FFFFFF}%s\n",PlayerName(playerid));
strcat(banned, string);
format(string,sizeof(string),"{AFAFAF}IP Address: {FFFFFF}%s\n",dini_Get(bancheck,"ip"));
strcat(banned, string);
format(string,sizeof(string),"{AFAFAF}Reason Banned: {FFFFFF}%s\n",dini_Get(bancheck,"BanReason"));
strcat(banned, string);
format(string,sizeof(string),"{AFAFAF}Banned by: {FFFFFF}%s\n",dini_Get(bancheck,"BannedBy"));
strcat(banned, string);
format(string,sizeof(string),"{AFAFAF}Feeling wrongfully banned? Appeal your ban at: {a9c4e4}forum.ultragamerz.co\n",dini_Get(bancheck,"BannedBy"));
strcat(banned, string);
ShowPlayerDialog(playerid,DIALOG_BAN,DIALOG_STYLE_MSGBOX,"San Fierro Cops And robbers",banned,"Okay","");
Kicked(playerid, 500);
return 1;
}
//*************************-Login/Register check-***************************
else if (!udb_Exists(PlayerName(playerid)))
{
ShowRegisterScreen(playerid);
PlayerTextDrawShow(playerid,servname1[playerid]);
PlayerTextDrawShow(playerid,servname2[playerid]);
PlayerTextDrawSetString(playerid,servname1[playerid],"~g~~h~~h~S~w~an ~g~~h~~h~F~w~ierro");
PlayerTextDrawSetString(playerid,servname2[playerid],"~b~Cops ~w~And ~r~Robbers");
PlayerTextDrawShow(playerid,wb[playerid]);
PlayerTextDrawSetString(playerid,wb[playerid],"~r~W~w~elcome~r~!");
PlayerTextDrawShow(playerid,box1[playerid]);
PlayerTextDrawShow(playerid,box2[playerid]);
PlayerTextDrawShow(playerid,box3[playerid]);
}
else
{
PlayerTextDrawShow(playerid,servname1[playerid]);
PlayerTextDrawShow(playerid,servname2[playerid]);
PlayerTextDrawSetString(playerid,servname1[playerid],"~g~~h~~h~S~w~an ~g~~h~~h~F~w~ierro");
PlayerTextDrawSetString(playerid,servname2[playerid],"~b~Cops ~w~And ~r~Robbers");
ShowLoginScreen(playerid);
PlayerTextDrawShow(playerid,wb[playerid]);
PlayerTextDrawSetString(playerid,wb[playerid],"~y~W~w~elcome ~y~B~w~ack~y~!");
PlayerTextDrawShow(playerid,box1[playerid]);
PlayerTextDrawShow(playerid,box2[playerid]);
PlayerTextDrawShow(playerid,box3[playerid]);
}
foreach(Player, i)
{
if(cl[i] == 1)
{
format(string,sizeof(string),"{CCFFCC}** %s(%d) has joined the server.",PlayerName(playerid),playerid);
SCM(i,-1,string);
return 1;
}
}
for(new i = 0; i < sizeof(Objects); i++) Player[playerid][view][i] = false; /////////xobj
return 1;
}