10.08.2014, 14:04
OnPlayerConnect
OnPlayerRequestClass
PHP код:
public OnPlayerConnect(playerid)
{
PlayAudioStreamForPlayer(playerid, "http://dc584.4shared.com/img/3276137388/9003a8ec/dlink__2Fdownload_2FyUymRXoQ_3Ftsid_3D20130115-151114-aa7204f7/preview.mp3");
TextDrawShowForPlayer(playerid, Entrada[playerid]);
TextDrawShowForPlayer(playerid, SPS[playerid]);
DisablePlayerCheckpoint(playerid);
KillTimer(timer[playerid]);
StopAudioStreamForPlayer(playerid);
FilaAtendimentoText[playerid] = TextDrawCreate(500 ,150 , "_");
TextDrawFont(FilaAtendimentoText[playerid] , 1);
TextDrawLetterSize(FilaAtendimentoText[playerid] , 0.399999, 1.300000);
TextDrawColor(FilaAtendimentoText[playerid] , 0xc4ff00FF);
TextDrawSetOutline(FilaAtendimentoText[playerid] , 1);
TextDrawSetProportional(FilaAtendimentoText[playerid] , true);
TextDrawSetShadow(FilaAtendimentoText[playerid] , 1);
TextDrawHideForPlayer(playerid,FilaAtendimentoText[playerid]);
TempoAtendimento2Text[playerid] = TextDrawCreate(500 ,165 , "_");
TextDrawFont(TempoAtendimento2Text[playerid] , 1);
TextDrawLetterSize(TempoAtendimento2Text[playerid] , 0.399999, 1.300000);
TextDrawColor(TempoAtendimento2Text[playerid] , 0xc4ff00FF);
TextDrawSetOutline(TempoAtendimento2Text[playerid] , 1);
TextDrawSetProportional(TempoAtendimento2Text[playerid] , true);
TextDrawSetShadow(TempoAtendimento2Text[playerid] , 1);
TextDrawHideForPlayer(playerid,TempoAtendimento2Text[playerid]);
FilaAtendimento[playerid] = 999;
TempoAtendimento2[playerid] = 0;
glob000[playerid] = 0;
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid))
{
SpawnPlayer(playerid);
return true;
}
new string[128];
new string3[128];
new ip[16];
GetPlayerIp(playerid, ip, sizeof ip);
format(string3, sizeof(string3), "Banidos/%s.ini", PlayerName(playerid));
if(fexist(string3)) //autoban
{
ClearChatbox(playerid, 10);
strmid(BanInfo[playerid][pMotivo], dini_Get(string3,"Motivo"), 0, strlen(dini_Get(string3,"Motivo")), 255);
strmid(BanInfo[playerid][pAdmBan], dini_Get(string3,"Admin"), 0, strlen(dini_Get(string3,"Admin")), 255);
strmid(BanInfo[playerid][pData], dini_Get(string3,"Data"), 0, strlen(dini_Get(string3,"Data")), 255);
strmid(BanInfo[playerid][pHora], dini_Get(string3,"Hora"), 0, strlen(dini_Get(string3,"Hora")), 255);
SendClientMessage(playerid, COLOR_WHITE, "|_______________[ Informaзхes do Ban ]_______________|");
format(string, sizeof(string), "Seu Nick:[%s] estб Banido do {0000FF}Brasil Sao Paulo {00BFFF}Style.", PlayerName(playerid));
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "Motivo: %s", BanInfo[playerid][pMotivo]);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "Admin: %s", BanInfo[playerid][pAdmBan]);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "Dia: %s, Hora: %s", BanInfo[playerid][pData], BanInfo[playerid][pHora]);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_YELLOW, "Para revisгo de ban acesse nosso forum: www.********.com/Groups/SaoPauloStyle");
SendClientMessage(playerid, COLOR_YELLOW, "Atenзгo: Vocк sу serб desbanido caso for inocente !");
new stri[64], tmp[20], tmp2[20];
format(stri, sizeof(stri), "IPsBanidos/%s.ini",ip);
getdate(Ano, Mes, Dia);
format(tmp, 20, "%d/%d/%d", Dia, Mes, Ano);
gettime(Hora, Minuto, Segundo);
format(tmp2, 20, "%d:%d:%d", Hora, Minuto, Segundo);
if(dini_Exists(stri))
{
Kick(playerid);
}
else
{
dini_Create(stri);
dini_Set(stri,"Motivo",BanInfo[playerid][pMotivo]);
dini_Set(stri,"Admin",BanInfo[playerid][pAdmBan]);
dini_Set(stri,"Data",BanInfo[playerid][pData]);
dini_Set(stri,"Hora",BanInfo[playerid][pHora]);
dini_Set(stri,"Nick",PlayerName(playerid));
}
Kick(playerid);
}