pawn Код:
public OnPlayerSpawn(playerid)
{
if(Player[playerid][FirstSpawn] == true)
{
Player[playerid][FirstSpawn] = false;
if(gPlayerLogged[playerid])
{
new lol[256];
format(lol,256,"/RPG/bans/%s.ini", Player[playerid][pName]);
if(strcmp(Player[playerid][pName],"Max_BFH",true)==0)
goto Join;
if(strcmp(Player[playerid][pName],"Boob_BFH",true)==0)
goto Join;
if(dini_Exists(lol))
{
new string[128], banfile[256];
new admin[52], data[52], tempban[128];
format(admin,52,"%s", dini_Get(lol,"AdminName"));
format(data,52,"%s", dini_Get(lol,"Data"));
new tick = dini_Int(lol,"BanTime");
if(tick > 0)
{
if(tick < GetTickCount())
format(tempban,128,"|| Ban temporбrio - Acaba em %s", Convert(tick-GetTickCount()));
else
{
SendClientMessage(playerid, COLOR_RED,"[ADMIN BOT] Seu ban temporбrio acabou.");
dini_Remove(lol);
goto Join;
}
}
SendClientMessage(playerid, COLOR_BARRAS,"=============================================================");
format(string,128,"- Esse nick '%s' foi banido pelo '%s' em '%s'", Player[playerid][pName], admin, data);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string,128,"- Motivo: '%s' %s", dini_Get(lol, "Motivo"), tempban);
SendClientMessage(playerid, COLOR_WHITE, string);
SendClientMessage(playerid, COLOR_ORANGE,"Visite a pбgina 'revisao.sampbrasil.com.br', leia as regras e crie seu tуpico com esta imagem. (F8 para capturб-la)");
SendClientMessage(playerid, COLOR_BARRAS,"=============================================================");
banfile = GetBannedFile(playerid);
if(!dini_Exists(banfile) && tick == 0)
{
new hour, minute, second, day, month, year;
gettime(hour, minute, second);
getdate(year, month, day);
dini_Create(banfile);
dini_Set(banfile,"PlayerName", Player[playerid][pName]);
dini_Set(banfile,"AdminName", "Admin Bot");
dini_Set(banfile,"Motivo", "Evasгo de Ban (Old)");
format(string, sizeof(string), "%02d/%02d аs %02d:%02d", day, month, hour, minute);
dini_Set(banfile,"Data", string);
}
return Kick(playerid);
}
}
Join:
TextDrawShowForPlayer(playerid, MoneyTD);
TextDrawShowForPlayer(playerid, ServerLogo2);
TextDrawShowForPlayer(playerid, ServerLogo1);
}
PlaySoundForPlayer(playerid, 1057);
StopMusic(playerid);
if(IsPlayerNPC(playerid)) //Checa se o jogador й um NPC.
{
SetPlayerSkin(playerid, 181);
return 1;
}
nowh[playerid] = 0;
Incasa[playerid] = Player[playerid][pPhousekey];
SetTimerEx("TurfsDebug",3000, false, "i", playerid);
InitLockDoors(playerid);
SetPlayerHealth(playerid, 100);
STDPlayer[playerid] = 0;
gTeam[playerid] = Player[playerid][pTeam]; //Set the Team
if(Player[playerid][pAdmin] > 0)
SetPlayerChatBubble(playerid, AccountName(playerid), COLOR_YELLOW, 50.0, 14400000);
if(gTeam[playerid] == 0 && Player[playerid][pLeader] < 1)
{
new rand = random(sizeof(CIV));
Player[playerid][pTeam] = 0;
gTeam[playerid] = 0;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
Player[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
if(Player[playerid][pMember] >= 1 || Player[playerid][pLeader] >= 1)
{
new model = Player[playerid][pChar];
if(Player[playerid][pMember] == TEAM_PM) { SetSpawnInfo(playerid, 2, model,232.7498,73.7373,1005.0391,0,0,0,0,0,0,0); SetPlayerInterior(playerid,6); Player[playerid][pTeam] = 1; gTeam[playerid] = 1; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_PF) { SetSpawnInfo(playerid, 2, model,246.8530,191.1396,1008.1719,0,0,0,0,0,0,0); SetPlayerInterior(playerid,3); Player[playerid][pTeam] = 2; gTeam[playerid] = 2; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_FA) { SetSpawnInfo(playerid, 2, model,308.3213,-164.8176,999.5938,0,0,0,0,0,0,0); SetPlayerInterior(playerid,6); Player[playerid][pTeam] = 2; gTeam[playerid] = 2; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_BOMBE) { SetSpawnInfo(playerid, 2, model,322.1362,314.4944,999.1484,0,0,0,0,0,0,0); SetPlayerVirtualWorld(playerid,1); Player[playerid][pTeam] = 12; gTeam[playerid] = 12; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_BALLAS) { SetSpawnInfo(playerid, 5, model,320.1363,1120.9073,1083.8828,0,0,0,0,0,0,0); SetPlayerInterior(playerid,5); Player[playerid][pTeam] = 7; gTeam[playerid] = 7; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_GROOVE) { SetSpawnInfo(playerid, 5, model,2495.8708,-1709.6356,1014.7422,0,0,0,0,0,0,0); SetPlayerInterior(playerid,0); Player[playerid][pTeam] = 7; gTeam[playerid] = 7; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_PREF) { SetSpawnInfo(playerid, 2, model,371.0658,176.3289,1019.9844,0,0,0,0,0,0,0); SetPlayerInterior(playerid,0); Player[playerid][pTeam] = 7; gTeam[playerid] = 7; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_HITMAN) { SetSpawnInfo(playerid, 10, model,1216.0000,-1674.0352,11.7968,0,0,0,0,0,0,0); Player[playerid][pTeam] = 10; gTeam[playerid] = 10; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_SANEWS) { SetSpawnInfo(playerid, 12, model,359.1192,207.2973,1008.3828,0,0,0,0,0,0,0); SetPlayerInterior(playerid,3); Player[playerid][pTeam] = 12; gTeam[playerid] = 12; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_LOWRIDERS) { SetSpawnInfo(playerid, 12, model,1131.3792,6.3850,1002.0859,0,0,0,0,0,0,0); SetPlayerInterior(playerid,12); Player[playerid][pTeam] = 16; gTeam[playerid] = 16; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_VAGOS) { SetSpawnInfo(playerid, 12, model,2342.9595,-1186.8358,1027.9766,0,0,0,0,0,0,0); SetPlayerInterior(playerid,0); Player[playerid][pTeam] = 16; gTeam[playerid] = 16; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_BIKERS) { SetSpawnInfo(playerid, 12, model,508.3417,-80.1715,998.9609,0,0,0,0,0,0,0); Player[playerid][pTeam] = 16; gTeam[playerid] = 16; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_MUNICIPAL) { SetSpawnInfo(playerid, 12, model,322.0075,314.4984,999.1484,0,0,0,0,0,0,0); SetPlayerInterior(playerid,5); Player[playerid][pTeam] = 14; gTeam[playerid] = 14; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_RUSSA) { SetSpawnInfo(playerid, 12, model,1271.1736,-782.1465,1084.0149,0,0,0,0,0,0,0); SetPlayerInterior(playerid,0); Player[playerid][pTeam] = 16; gTeam[playerid] = 16; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_DRIFTERS) { SetSpawnInfo(playerid, 12, model,-226.2575,1409.8733,27.7734,0,0,0,0,0,0,0); Player[playerid][pTeam] = 16; gTeam[playerid] = 16; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_BLOODS) { SetSpawnInfo(playerid, 12, model,416.1714,2537.2358,10.0000,0,0,0,0,0,0,0); Player[playerid][pTeam] = 16; gTeam[playerid] = 16; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_CREEPS) { SetSpawnInfo(playerid, 12, model,2554.1692,-1285.9547,1060.9844,0,0,0,0,0,0,0); Player[playerid][pTeam] = 16; gTeam[playerid] = 16; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_BOPE) { SetSpawnInfo(playerid, 2, model,248.9618,115.4132,1003.2188,0,0,0,0,0,0,0); Player[playerid][pTeam] = 21; gTeam[playerid] = 21; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_ALQAEDA) { SetSpawnInfo(playerid, 12, model,138.1272,2549.4780,16.4739,168.0086,0,0,0,0,0,0); Player[playerid][pTeam] = 22; gTeam[playerid] = 22; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_KINGS) { SetSpawnInfo(playerid, 12, model,446.0672,-9.3721,1000.7343,0,0,0,0,0,0,0); Player[playerid][pTeam] = 16; gTeam[playerid] = 16; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_ITALIANA) { SetSpawnInfo(playerid, 12, model,-789.5807,509.7085,1367.3745,194.7287,0,0,0,0,0,0); SetPlayerInterior(playerid,1); Player[playerid][pTeam] = 16; gTeam[playerid] = 25; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_PM) { SetSpawnInfo(playerid, 11, model,232.7498,73.7373,1005.0391,0,0,0,0,0,0,0); SetPlayerInterior(playerid,6); Player[playerid][pTeam] = 1; gTeam[playerid] = 1; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_PF) { SetSpawnInfo(playerid, 11, model,246.8530,191.1396,1008.1719,0,0,0,0,0,0,0); SetPlayerInterior(playerid,3); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_FA) { SetSpawnInfo(playerid, 11, model,308.3213,-164.8176,999.5938,0,0,0,0,0,0,0); SetPlayerInterior(playerid,6); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_BALLAS) { SetSpawnInfo(playerid, 11, model,320.1363,1120.9073,1083.8828,0,0,0,0,0,0,0); SetPlayerInterior(playerid,5); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_GROOVE) { SetSpawnInfo(playerid, 11, model,2495.8708,-1709.6356,1014.7422,0,0,0,0,0,0,0); SetPlayerInterior(playerid,0); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_PREF) { SetSpawnInfo(playerid, 11, model,371.0658,176.3289,1019.9844,0,0,0,0,0,0,0); SetPlayerInterior(playerid,0); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_HITMAN) { SetSpawnInfo(playerid, 11, model,1216.0000,-1674.0352,11.7968,0,0,0,0,0,0,0); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_SANEWS) { SetSpawnInfo(playerid, 11, model,359.1192,207.2973,1008.3828,0,0,0,0,0,0,0); SetPlayerInterior(playerid,3); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_LOWRIDERS) { SetSpawnInfo(playerid, 11, model,1131.3792,6.3850,1002.0859,0,0,0,0,0,0,0); SetPlayerInterior(playerid,12); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_VAGOS) { SetSpawnInfo(playerid, 11, model,2342.9595,-1186.8358,1027.9766,0,0,0,0,0,0,0); SetPlayerInterior(playerid,0); Player[playerid][pTeam] = 7; gTeam[playerid] = 7; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_MUNICIPAL) { SetSpawnInfo(playerid, 11, model,322.0075,314.4984,999.1484,0,0,0,0,0,0,0); SetPlayerInterior(playerid,5); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_AZTECAS) { SetSpawnInfo(playerid, 11, model,2817.9768,-1169.7797,1025.5778,0,0,0,0,0,0,0); SetPlayerInterior(playerid,8);Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_RUSSA) { SetSpawnInfo(playerid, 11, model,1271.1736,-782.1465,1084.0149,0,0,0,0,0,0,0); SetPlayerInterior(playerid,0); Player[playerid][pTeam] = 16; gTeam[playerid] = 16; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_DRIFTERS) { SetSpawnInfo(playerid, 11, model,-226.2575,1409.8733,27.7734,0,0,0,0,0,0,0); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_BLOODS) { SetSpawnInfo(playerid, 11, model,416.1714,2537.2358,10.0000,0,0,0,0,0,0,0); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_CREEPS) { SetSpawnInfo(playerid, 11, model,2554.1692,-1285.9547,1060.9844,0,0,0,0,0,0,0); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_BOPE) { SetSpawnInfo(playerid, 11, model,248.9618,115.4132,1003.2188,0,0,0,0,0,0,0); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_ALQAEDA) { SetSpawnInfo(playerid, 11, model,138.1272,2549.4780,16.4739,168.0086,0,0,0,0,0,0); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pLeader] == TEAM_KINGS) { SetSpawnInfo(playerid, 11, model,446.0672,-9.3721,1000.7343,0,0,0,0,0,0,0); Player[playerid][pTeam] = 11; gTeam[playerid] = 11; Player[playerid][pModel] = model; }
else if(Player[playerid][pMember] == TEAM_ITALIANA) { SetSpawnInfo(playerid, 12, model,-789.5807,509.7085,1367.3745,194.7287,0,0,0,0,0,0); SetPlayerInterior(playerid,1); Player[playerid][pTeam] = 25; gTeam[playerid] = 25; Player[playerid][pModel] = model; }
}
if(Player[playerid][pChar] > 0){ SetPlayerSkin(playerid, Player[playerid][pModel]); }
else { SetPlayerSkin(playerid, Player[playerid][pModel]); }
SetPlayerToTeamColor(playerid);
return 1;
}