20.06.2013, 15:46
Meu GM quando o Cara morre ele ja vai pro hospital, queria saber Em qual parte ( Sei que e OnPlayerDeath ) mais qual parte eu retiro pra poder colocar a coordenada do hosp.
SetTimer("IrHospital", 4300, false);
forward IrHospital(playerid); public IrHospital(playerid) { SetPlayerPos(playerid, X, Y, Z); //Troque o "X", o "Y" e o "Z" pelas coordenadas do hospital. return 1; }
Nгo tenho certeza se й a melhor forma de fazк-lo, mas no meu GameMode eu fiz o seguinte:
Na public OnPlayerDeath coloque um Timer, exemplo: Код:
SetTimer("IrHospital", 4300, false); "IrHospital" - Nome do Timer "4300" - Tempo em que ele serб executado (1000 = 1 Segundo), no caso, 4,3 segundos apуs ele morrer o "IrHospital" serб ativado. "false" - Repetiзгo, true (ou 1) para verdadeiro, false (ou 0) para falso. Depois crie uma Public com o Nome do Timer e as funзхes.. Код:
forward IrHospital(playerid); public IrHospital(playerid) { SetPlayerPos(playerid, X, Y, Z); //Troque o "X", o "Y" e o "Z" pelas coordenadas do hospital. return 1; } Espero ter ajudado. Abraзo. |
public OnPlayerDeath(playerid, killerid, reason) { //if(emguerra[playerid] == 1) //{ //format(gstring, 128, "%s saiu da zona de guerra!", PlayerName(playerid)); //SendClientMessageToAll(GetPlayerColor(playerid), gstring); //emguerra[playerid] = 0; //}*/ //new dmessage[128]; //new deathreason[20]; new Float:px,Float:py,Float:pz; PlayerInactivity[playerid] = 0; //DropGrana(playerid); gPlayerSpawned[playerid] = 0; PlayerInfo[playerid][pLocal] = 255; GetPlayerPos(playerid, px, py, pz); spawnado[playerid] = 0; if (gPlayerTerminal[playerid] != 0) { BusrouteEnd(playerid); } if(PlayerPaintballing[killerid] == 0 && IsPlayerInFazenda(playerid) == 0 && IsPlayerInFavela(playerid) == 0 && IsPlayerInSkate(playerid) == 0 && IsPlayerInEstacao(playerid) == 0 && IsPlayerInCasarao(playerid) == 0 && IsPlayerInArenaX1(playerid) == 0) { SetPlayerCriminal(killerid, 255, "Assassinato"); PlayerInfo[killerid][pKills] += 1; } if(TendoGuerra == 1 && IsPlayerInTerritorio(playerid) && IsPlayerInTerritorio(killerid)) { if(PlayerInfo[killerid][pMembro] == 3 || PlayerInfo[killerid][pLider] == 3) { if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6) { Territorio[talmortos] += 1; } if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15) { Territorio[almortos] += 1; } } if(PlayerInfo[killerid][pMembro] == 6 || PlayerInfo[killerid][pLider] == 6) { if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3) { Territorio[exemortos] += 1; } if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15) { Territorio[almortos] += 1; } } if(PlayerInfo[killerid][pMembro] == 15 || PlayerInfo[killerid][pLider] == 15) { if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3) { Territorio[exemortos] += 1; } if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6) { Territorio[talmortos] += 1; } } } if(InvitedDuel[killerid] == true) { new Float: healthkiller; new namekiller[24],namedeather[24],string[80]; GetPlayerName(killerid, namekiller, 24); GetPlayerName(playerid, namedeather, 24); GetPlayerHealth(killerid,healthkiller); format(string, sizeof(string), "»»[BSL-DUEL]«« : %s Ganhou Duelo de %s com %0.0f de energia (Colete & Vida)", namekiller, namedeather, healthkiller); SendClientMessageToAll(0x0000BBAA, string); InvitedDuel[killerid] = true; InvitedDuel[playerid] = true; IdDuel[playerid] = playerid; IdDuel[killerid] = killerid; //ArenaUsada > 1; healthkiller = 0; SpawnPlayer(killerid); SpawnPlayer(playerid); } { new Fala[70]; format(Fala,sizeof(Fala),"Vocк morreu para %s [ID: %d]",PlayerName(killerid),killerid); SendClientMessage(playerid,0xA92BAAAA,Fala); format(Fala,sizeof(Fala),"Vocк matou %s [ID: %d]",PlayerName(playerid),playerid); SendClientMessage(killerid,0xA92BAAAA,Fala); } //==================================[DM]=====================================// if(playerintdm[playerid] == 1) { new tdmPlayerName[MAX_PLAYER_NAME]; new string[128]; GetPlayerName(playerid, tdmPlayerName, sizeof(tdmPlayerName)); if(GetPlayerColor(playerid) == 0x0000BBAA) { format(string, sizeof(string), "%s foi derrubado fora da equipe do DM, a equipe azul", tdmPlayerName); blueplayers = blueplayers-1; } else { format(string, sizeof(string), "%s foi derrubado fora da equipe do DM, a equipe vermelha", tdmPlayerName); redplayers = redplayers-1; } SendClientMessageToAll(0x33AA33AA, string); playerintdm[playerid] = 0; playerinminigame[playerid] = 0; if(tdmrank == 0) { tdmplaying = 0; tdmrank = 0; tdmon = 0; KillTimer(tdmtimer); return 1; } if((blueplayers == 0 || redplayers == 0) && tdmplaying == 1) { if(blueplayers == 0) { format(string, sizeof(string), "Time vermelho ganhou o Evento DM"); } else if(redplayers == 0) { format(string, sizeof(string), "Time azul ganhou o Evento DM"); } SendClientMessageToAll(0x33AA33AA, string); for(new i=0; i<MAX_PLAYERS; i++) { if (IsPlayerConnected(i) && playerintdm[i] == 1) { playerintdm[i] = 0; playerinminigame[i] = 0; SetPlayerVirtualWorld(i,0); SetPlayerInterior(playerid, 0); SetPlayerColor(i,oldplayercolor[i]); SetPlayerPos(i, spawnX, spawnY, spawnZ); } } tdmplaying = 0; tdmrank = 0; tdmon = 0; KillTimer(tdmtimer); return 1; } tdmrank--; } //==================================[SUSPEITO MORTO]=========================// if(WantedPoints[playerid] >= 1) { //if(gTeam[killerid] == 2 && CrimInRange(30.0, playerid,killerid)) //{ new price = WantedPoints[playerid] * 100; if(PlayerInfo[killerid][pMembro] == 1 || PlayerInfo[killerid][pLider] == 1) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 1; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Militar, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 2 || PlayerInfo[killerid][pLider] == 2) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 3; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na HQ BOPE, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 3 || PlayerInfo[killerid][pLider] == 3) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 7; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos no Exйrcito, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 16 || PlayerInfo[killerid][pLider] == 16) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 4; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Civil, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 11 || PlayerInfo[killerid][pLider] == 11) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 5; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Federal, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } //} } //=================[NOVO ROUBAR]================ if(ProvocoBanco[playerid] == 1) { format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0; } if(ProvocoLot[playerid] == 1) { format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Lotйrica! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ProvocoLot[playerid] = 0; roubando[playerid] = 0; roubolot = 0; KillTimer(tempolot); temporoubolot = 0; } if(ProvocoLoja1[playerid] == 1) { format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Loja de Armas 1! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ProvocoLoja1[playerid] = 0; roubando[playerid] = 0; rouboloja1 = 0; KillTimer(tempoloja1); temporouboloja1 = 0; } if(ProvocoLoja2[playerid] == 1) { format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Loja de Armas 2! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ProvocoLoja2[playerid] = 0; roubando[playerid] = 0; rouboloja2 = 0; KillTimer(tempoloja2); temporouboloja2 = 0; } if(ProvocoPrefe[playerid] == 1) { format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Prefeitura! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ProvocoPrefe[playerid] = 0; roubando[playerid] = 0; rouboprefe = 0; KillTimer(tempoprefe); temporouboprefe = 0; } //=======================[FIM ROUBAR]======================== if(ProvocoFazenda[playerid] == 1) { GangZoneStopFlashForAll(GZFazenda); GangZoneShowForAll(GZFazenda, 0xFFFFFF96); GuerranaFazenda = 0; ProvocoFazenda[playerid] = 0; donofazenda = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraFazenda); } if(ProvocoCasarao[playerid] == 1) { GangZoneStopFlashForAll(GZCasarao); GangZoneShowForAll(GZCasarao, 0xFFFFFF96); GuerranoCasarao = 0; ProvocoCasarao[playerid] = 0; donocasarao = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraCasarao); } if(ProvocoEstacao[playerid] == 1) { GangZoneStopFlashForAll(GZEstacao); GangZoneShowForAll(GZEstacao, 0xFFFFFF96); GuerranaEstacao = 0; ProvocoEstacao[playerid] = 0; donoestacao = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraEstacao); } if(ProvocoFavela[playerid] == 1) { GangZoneStopFlashForAll(GZFavela); GangZoneShowForAll(GZFavela, 0xFFFFFF96); GuerranaFavela = 0; ProvocoFavela[playerid] = 0; donoFavela = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraFavela); } if(ProvocoSkate[playerid] == 1) { GangZoneStopFlashForAll(GZSkate); GangZoneShowForAll(GZSkate, 0xFFFFFF96); GuerranoSkate = 0; ProvocoSkate[playerid] = 0; donoskate = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraSkate); } if(GetPlayerState(killerid) == 2) { new carroDB = GetPlayerVehicleID(killerid); new nomexd[MAX_PLAYER_NAME]; new string[128]; GetPlayerName(killerid, nomexd, sizeof(nomexd)); if(IsAPlane(carroDB)) { return 1; } format(string, sizeof(string), "[ADM_Boot]: %s [id:%d] Cometeu DB em %s [id:%d], e serб kickado por um ADMIN.", PlayerName(killerid), killerid,PlayerName(playerid)); SendClientMessageToAll(COLOR_LIGHTRED, string); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); } if(reason == 38) { new string[128]; if(IsPlayerConnected(killerid)) { format(string, sizeof(string), "[ADM_Boot]: %s [id:%d] usou minigun em %s [id:%d] e foi kickado e preso por 120 minutos.", PlayerName(killerid), killerid,PlayerName(playerid)); SendClientMessageToAll(COLOR_LIGHTRED, string); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); PlayerInfo[killerid][pJailed] = 2; PlayerInfo[killerid][pJailTime] = 7200; Kick(killerid); } } if(reason == 35) { if(IsPlayerConnected(killerid)) { format(gstring, 128, "AdmAviso: [%d]%s usou Bazuka em %s.",killerid,PlayerName(killerid),PlayerName(playerid)); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); } } if(reason == 36) { if(IsPlayerConnected(killerid)) { format(gstring, 128, "AdmAviso: [%d]%s usou Bazuka =2= em %s.",killerid,PlayerName(killerid),PlayerName(playerid)); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); } } if(reason == 26) { if(IsPlayerConnected(killerid)) { format(gstring, 128, "AdmAviso: [%d]%s usou 12 Cano cerrado em %s.",killerid,PlayerName(killerid),PlayerName(playerid)); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); } } if(reason == 32) { if(IsPlayerConnected(killerid)) { format(gstring, 128, "AdmAviso: [%d]%s usou TEC9 em %s.",killerid,PlayerName(killerid),PlayerName(playerid)); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); } } if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11) { DisablePlayerCheckpoint(playerid); gPlayerCheckpointStatus[playerid] = CHECKPOINT_Nenhum; } new caller = Mobile[playerid]; if(caller != 255) { if(caller < 255) { SendClientMessage(caller, COLOR_GRAD2, "Morreram do outro lado da linha...."); CellTime[caller] = 0; CellTime[playerid] = 0; Mobile[caller] = 255; } Mobile[playerid] = 255; CellTime[playerid] = 0; } ClearCrime(playerid); if(PlayerPaintballing[playerid] != 0) { PlayerPaintballKills[killerid] ++; if(PlayerPaintballKills[killerid] > PaintballWinnerKills) { PaintballWinner = killerid; PaintballWinnerKills = PlayerPaintballKills[killerid]; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerPaintballing[i] != 0) { format(gstring, sizeof(gstring), "* %s estб em 1є com %d Kills.",PlayerName(killerid),PaintballWinnerKills); SendClientMessage(i, COLOR_WHITE, gstring); } } } } } if(PlayerInfo[playerid][pHeadValue] > 0) { if(IsPlayerConnected(killerid)) { if(gTeam[killerid] == 10 || PlayerInfo[killerid][pLider] == 8 || PlayerInfo[killerid][pMembro] == 8) { if(GoChase[killerid] == playerid) { new string[128]; ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]); format(string,128,"Vocк foi morto por contrato por um hitman no valor de R$%d e nгo foi DM!",PlayerName(killerid),PlayerInfo[playerid][pHeadValue]); //SendClientMessage(playerid, 0x33FF00FF, gstring); SendClientMessage(playerid, COLOR_YELLOW, gstring); format(string, sizeof(string),"<< O Hitman Cumpriu o contrato em %s e recebeu R$%d >>",PlayerName(playerid),PlayerInfo[playerid][pHeadValue],sendername); SendClientMessageToAll(0xFFFF00AA, string); PlayerInfo[playerid][pHeadValue] = 0; GotHit[playerid] = 0; GetChased[playerid] = 999; GoChase[killerid] = 999; } } } } if(PlayerInfo[killerid][pHeadValue] > 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pLider] == 8 || PlayerInfo[playerid][pMembro] == 8) { if(GoChase[playerid] == killerid) { ConsumingMoney[playerid] = 1; format(gstring,128,"<< Assasino %s foi morto por %s e perdeu o contrato >>",PlayerName(playerid),PlayerName(killerid)); SendFamilyMessage(8, COLOR_YELLOW, gstring); PlayerInfo[killerid][pHeadValue] = 0; GotHit[killerid] = 0; GetChased[killerid] = 999; GoChase[playerid] = 999; } } } } killerid = INVALID_PLAYER_ID; SetPlayerColor(playerid,COLOR_GRAD2); return 1; }
Код:
public OnPlayerDeath(playerid, killerid, reason) { //if(emguerra[playerid] == 1) //{ //format(gstring, 128, "%s saiu da zona de guerra!", PlayerName(playerid)); //SendClientMessageToAll(GetPlayerColor(playerid), gstring); //emguerra[playerid] = 0; //}*/ //new dmessage[128]; //new deathreason[20]; new Float:px,Float:py,Float:pz; PlayerInactivity[playerid] = 0; //DropGrana(playerid); gPlayerSpawned[playerid] = 0; PlayerInfo[playerid][pLocal] = 255; GetPlayerPos(playerid, px, py, pz); spawnado[playerid] = 0; if (gPlayerTerminal[playerid] != 0) { BusrouteEnd(playerid); } if(PlayerPaintballing[killerid] == 0 && IsPlayerInFazenda(playerid) == 0 && IsPlayerInFavela(playerid) == 0 && IsPlayerInSkate(playerid) == 0 && IsPlayerInEstacao(playerid) == 0 && IsPlayerInCasarao(playerid) == 0 && IsPlayerInArenaX1(playerid) == 0) { SetPlayerCriminal(killerid, 255, "Assassinato"); PlayerInfo[killerid][pKills] += 1; } if(TendoGuerra == 1 && IsPlayerInTerritorio(playerid) && IsPlayerInTerritorio(killerid)) { if(PlayerInfo[killerid][pMembro] == 3 || PlayerInfo[killerid][pLider] == 3) { if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6) { Territorio[talmortos] += 1; } if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15) { Territorio[almortos] += 1; } } if(PlayerInfo[killerid][pMembro] == 6 || PlayerInfo[killerid][pLider] == 6) { if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3) { Territorio[exemortos] += 1; } if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15) { Territorio[almortos] += 1; } } if(PlayerInfo[killerid][pMembro] == 15 || PlayerInfo[killerid][pLider] == 15) { if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3) { Territorio[exemortos] += 1; } if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6) { Territorio[talmortos] += 1; } } } if(InvitedDuel[killerid] == true) { new Float: healthkiller; new namekiller[24],namedeather[24],string[80]; GetPlayerName(killerid, namekiller, 24); GetPlayerName(playerid, namedeather, 24); GetPlayerHealth(killerid,healthkiller); format(string, sizeof(string), "»»[BSL-DUEL]«« : %s Ganhou Duelo de %s com %0.0f de energia (Colete & Vida)", namekiller, namedeather, healthkiller); SendClientMessageToAll(0x0000BBAA, string); InvitedDuel[killerid] = true; InvitedDuel[playerid] = true; IdDuel[playerid] = playerid; IdDuel[killerid] = killerid; //ArenaUsada > 1; healthkiller = 0; SpawnPlayer(killerid); SpawnPlayer(playerid); } { new Fala[70]; format(Fala,sizeof(Fala),"Vocк morreu para %s [ID: %d]",PlayerName(killerid),killerid); SendClientMessage(playerid,0xA92BAAAA,Fala); format(Fala,sizeof(Fala),"Vocк matou %s [ID: %d]",PlayerName(playerid),playerid); SendClientMessage(killerid,0xA92BAAAA,Fala); } //==================================[DM]=====================================// if(playerintdm[playerid] == 1) { new tdmPlayerName[MAX_PLAYER_NAME]; new string[128]; GetPlayerName(playerid, tdmPlayerName, sizeof(tdmPlayerName)); if(GetPlayerColor(playerid) == 0x0000BBAA) { format(string, sizeof(string), "%s foi derrubado fora da equipe do DM, a equipe azul", tdmPlayerName); blueplayers = blueplayers-1; } else { format(string, sizeof(string), "%s foi derrubado fora da equipe do DM, a equipe vermelha", tdmPlayerName); redplayers = redplayers-1; } SendClientMessageToAll(0x33AA33AA, string); playerintdm[playerid] = 0; playerinminigame[playerid] = 0; if(tdmrank == 0) { tdmplaying = 0; tdmrank = 0; tdmon = 0; KillTimer(tdmtimer); return 1; } if((blueplayers == 0 || redplayers == 0) && tdmplaying == 1) { if(blueplayers == 0) { format(string, sizeof(string), "Time vermelho ganhou o Evento DM"); } else if(redplayers == 0) { format(string, sizeof(string), "Time azul ganhou o Evento DM"); } SendClientMessageToAll(0x33AA33AA, string); for(new i=0; i<MAX_PLAYERS; i++) { if (IsPlayerConnected(i) && playerintdm[i] == 1) { playerintdm[i] = 0; playerinminigame[i] = 0; SetPlayerVirtualWorld(i,0); SetPlayerInterior(playerid, 0); SetPlayerColor(i,oldplayercolor[i]); SetPlayerPos(i, spawnX, spawnY, spawnZ); } } tdmplaying = 0; tdmrank = 0; tdmon = 0; KillTimer(tdmtimer); return 1; } tdmrank--; } //==================================[SUSPEITO MORTO]=========================// if(WantedPoints[playerid] >= 1) { //if(gTeam[killerid] == 2 && CrimInRange(30.0, playerid,killerid)) //{ new price = WantedPoints[playerid] * 100; if(PlayerInfo[killerid][pMembro] == 1 || PlayerInfo[killerid][pLider] == 1) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 1; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Militar, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 2 || PlayerInfo[killerid][pLider] == 2) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 3; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na HQ BOPE, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 3 || PlayerInfo[killerid][pLider] == 3) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 7; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos no Exйrcito, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 16 || PlayerInfo[killerid][pLider] == 16) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 4; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Civil, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 11 || PlayerInfo[killerid][pLider] == 11) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 5; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Federal, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } //} } //=================[NOVO ROUBAR]================ if(ProvocoBanco[playerid] == 1) { format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0; } if(ProvocoLot[playerid] == 1) { format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Lotйrica! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ProvocoLot[playerid] = 0; roubando[playerid] = 0; roubolot = 0; KillTimer(tempolot); temporoubolot = 0; } if(ProvocoLoja1[playerid] == 1) { format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Loja de Armas 1! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ProvocoLoja1[playerid] = 0; roubando[playerid] = 0; rouboloja1 = 0; KillTimer(tempoloja1); temporouboloja1 = 0; } if(ProvocoLoja2[playerid] == 1) { format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Loja de Armas 2! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ProvocoLoja2[playerid] = 0; roubando[playerid] = 0; rouboloja2 = 0; KillTimer(tempoloja2); temporouboloja2 = 0; } if(ProvocoPrefe[playerid] == 1) { format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Prefeitura! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ProvocoPrefe[playerid] = 0; roubando[playerid] = 0; rouboprefe = 0; KillTimer(tempoprefe); temporouboprefe = 0; } //=======================[FIM ROUBAR]======================== if(ProvocoFazenda[playerid] == 1) { GangZoneStopFlashForAll(GZFazenda); GangZoneShowForAll(GZFazenda, 0xFFFFFF96); GuerranaFazenda = 0; ProvocoFazenda[playerid] = 0; donofazenda = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraFazenda); } if(ProvocoCasarao[playerid] == 1) { GangZoneStopFlashForAll(GZCasarao); GangZoneShowForAll(GZCasarao, 0xFFFFFF96); GuerranoCasarao = 0; ProvocoCasarao[playerid] = 0; donocasarao = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraCasarao); } if(ProvocoEstacao[playerid] == 1) { GangZoneStopFlashForAll(GZEstacao); GangZoneShowForAll(GZEstacao, 0xFFFFFF96); GuerranaEstacao = 0; ProvocoEstacao[playerid] = 0; donoestacao = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraEstacao); } if(ProvocoFavela[playerid] == 1) { GangZoneStopFlashForAll(GZFavela); GangZoneShowForAll(GZFavela, 0xFFFFFF96); GuerranaFavela = 0; ProvocoFavela[playerid] = 0; donoFavela = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraFavela); } if(ProvocoSkate[playerid] == 1) { GangZoneStopFlashForAll(GZSkate); GangZoneShowForAll(GZSkate, 0xFFFFFF96); GuerranoSkate = 0; ProvocoSkate[playerid] = 0; donoskate = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraSkate); } if(GetPlayerState(killerid) == 2) { new carroDB = GetPlayerVehicleID(killerid); new nomexd[MAX_PLAYER_NAME]; new string[128]; GetPlayerName(killerid, nomexd, sizeof(nomexd)); if(IsAPlane(carroDB)) { return 1; } format(string, sizeof(string), "[ADM_Boot]: %s [id:%d] Cometeu DB em %s [id:%d], e serб kickado por um ADMIN.", PlayerName(killerid), killerid,PlayerName(playerid)); SendClientMessageToAll(COLOR_LIGHTRED, string); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); } if(reason == 38) { new string[128]; if(IsPlayerConnected(killerid)) { format(string, sizeof(string), "[ADM_Boot]: %s [id:%d] usou minigun em %s [id:%d] e foi kickado e preso por 120 minutos.", PlayerName(killerid), killerid,PlayerName(playerid)); SendClientMessageToAll(COLOR_LIGHTRED, string); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); PlayerInfo[killerid][pJailed] = 2; PlayerInfo[killerid][pJailTime] = 7200; Kick(killerid); } } if(reason == 35) { if(IsPlayerConnected(killerid)) { format(gstring, 128, "AdmAviso: [%d]%s usou Bazuka em %s.",killerid,PlayerName(killerid),PlayerName(playerid)); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); } } if(reason == 36) { if(IsPlayerConnected(killerid)) { format(gstring, 128, "AdmAviso: [%d]%s usou Bazuka =2= em %s.",killerid,PlayerName(killerid),PlayerName(playerid)); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); } } if(reason == 26) { if(IsPlayerConnected(killerid)) { format(gstring, 128, "AdmAviso: [%d]%s usou 12 Cano cerrado em %s.",killerid,PlayerName(killerid),PlayerName(playerid)); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); } } if(reason == 32) { if(IsPlayerConnected(killerid)) { format(gstring, 128, "AdmAviso: [%d]%s usou TEC9 em %s.",killerid,PlayerName(killerid),PlayerName(playerid)); ABroadCast(COLOR_YELLOW,gstring,1); printf("%s", gstring); } } if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11) { DisablePlayerCheckpoint(playerid); gPlayerCheckpointStatus[playerid] = CHECKPOINT_Nenhum; } new caller = Mobile[playerid]; if(caller != 255) { if(caller < 255) { SendClientMessage(caller, COLOR_GRAD2, "Morreram do outro lado da linha...."); CellTime[caller] = 0; CellTime[playerid] = 0; Mobile[caller] = 255; } Mobile[playerid] = 255; CellTime[playerid] = 0; } ClearCrime(playerid); if(PlayerPaintballing[playerid] != 0) { PlayerPaintballKills[killerid] ++; if(PlayerPaintballKills[killerid] > PaintballWinnerKills) { PaintballWinner = killerid; PaintballWinnerKills = PlayerPaintballKills[killerid]; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerPaintballing[i] != 0) { format(gstring, sizeof(gstring), "* %s estб em 1є com %d Kills.",PlayerName(killerid),PaintballWinnerKills); SendClientMessage(i, COLOR_WHITE, gstring); } } } } } if(PlayerInfo[playerid][pHeadValue] > 0) { if(IsPlayerConnected(killerid)) { if(gTeam[killerid] == 10 || PlayerInfo[killerid][pLider] == 8 || PlayerInfo[killerid][pMembro] == 8) { if(GoChase[killerid] == playerid) { new string[128]; ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]); format(string,128,"Vocк foi morto por contrato por um hitman no valor de R$%d e nгo foi DM!",PlayerName(killerid),PlayerInfo[playerid][pHeadValue]); //SendClientMessage(playerid, 0x33FF00FF, gstring); SendClientMessage(playerid, COLOR_YELLOW, gstring); format(string, sizeof(string),"<< O Hitman Cumpriu o contrato em %s e recebeu R$%d >>",PlayerName(playerid),PlayerInfo[playerid][pHeadValue],sendername); SendClientMessageToAll(0xFFFF00AA, string); PlayerInfo[playerid][pHeadValue] = 0; GotHit[playerid] = 0; GetChased[playerid] = 999; GoChase[killerid] = 999; } } } } if(PlayerInfo[killerid][pHeadValue] > 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pLider] == 8 || PlayerInfo[playerid][pMembro] == 8) { if(GoChase[playerid] == killerid) { ConsumingMoney[playerid] = 1; format(gstring,128,"<< Assasino %s foi morto por %s e perdeu o contrato >>",PlayerName(playerid),PlayerName(killerid)); SendFamilyMessage(8, COLOR_YELLOW, gstring); PlayerInfo[killerid][pHeadValue] = 0; GotHit[killerid] = 0; GetChased[killerid] = 999; GoChase[playerid] = 999; } } } } killerid = INVALID_PLAYER_ID; SetPlayerColor(playerid,COLOR_GRAD2); return 1; } |
Pode postar a OnPlayerSpawn ?
O que seria "PlayerInfo[playerid][pLocal] = 255;" ? |
public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) //teste bot { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); //Obtendo o nome do(s) NPC(s). if(!strcmp(npcname, "bot_detrem", true)) //Checando se o nome do NPC й MeuPrimeiroNPC { PutPlayerInVehicle(playerid, trembot, 0); //Colocar o NPC dentro do veнculo que criamos para isso. SetPlayerSkin(playerid, 61); } if(!strcmp(npcname, "bot_onibus", true))//ONIBUS BOT { PutPlayerInVehicle(playerid, NPCBus, 0); SetPlayerSkin(playerid, 61); } return 1; } if(sincronizando[playerid] == 1) { return 1; } gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team if (gTeam[playerid] == 4) //medic / criminal reset team { gTeam[playerid] = 3; } if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_LIGHTRED, "AdmCmd: Vocк foi kickado Automaticamente, Motivo: Spawn sem login"); SendClientMessage(playerid, COLOR_LIGHTRED,"Vocк foi kickado do servidor, e nгo o contrarie novamente"); Kick(playerid); return 1; } CheckInfoOrg(playerid); if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLider] < 1) { MedicBill[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo foi aprovado pelo lнder, agora й um Civil !"); PlayerInfo[playerid][pTeam] = 3; gTeam[playerid] = 3; if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 41; } SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); SpawnPlayer(playerid); } if(gTeam[playerid] == 5) { if(PlayerInfo[playerid][pMembro] < 1) { MedicBill[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo faz parte de uma familia, agora й um Civil !"); PlayerInfo[playerid][pTeam] = 3; gTeam[playerid] = 3; if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 41; } SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); SpawnPlayer(playerid); } } if(gTeam[playerid] == 10) { if(PlayerInfo[playerid][pMembro] != 8) { MedicBill[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo faz parte de uma agencia, й um Civil !"); PlayerInfo[playerid][pTeam] = 3; gTeam[playerid] = 3; if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 41; } SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); SpawnPlayer(playerid); } } if(gTeam[playerid] == 2 && PlayerInfo[playerid][pMembro] > 3) { MedicBill[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo й mais um oficial, й um Civil !"); PlayerInfo[playerid][pTeam] = 3; gTeam[playerid] = 3; if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 41; } SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); SpawnPlayer(playerid); } if(gTeam[playerid] == 3) { if(PlayerInfo[playerid][pMembro] > 0 || PlayerInfo[playerid][pLider] > 0) { MedicBill[playerid] = 0; if(PlayerInfo[playerid][pMembro] == 1) { SetSpawnInfo(playerid, 2, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; } else if(PlayerInfo[playerid][pMembro] == 2) { SetSpawnInfo(playerid, 2, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; } else if(PlayerInfo[playerid][pMembro] == 3) { SetSpawnInfo(playerid, 2, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; } else if(PlayerInfo[playerid][pMembro] == 4) { SetSpawnInfo(playerid, 1, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; } else if(PlayerInfo[playerid][pMembro] == 5) { SetSpawnInfo(playerid, 5, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; } else if(PlayerInfo[playerid][pMembro] == 6) { SetSpawnInfo(playerid, 5, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; } else if(PlayerInfo[playerid][pMembro] == 8) { SetSpawnInfo(playerid, 10, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; } else if(PlayerInfo[playerid][pMembro] == 9) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; } else if(PlayerInfo[playerid][pMembro] == 10) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; } else if(PlayerInfo[playerid][pMembro] == 11) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; } else if(PlayerInfo[playerid][pMembro] == 12) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 22; } else if(PlayerInfo[playerid][pMembro] == 13) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 20; } else if(PlayerInfo[playerid][pMembro] == 14) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 15; } else if(PlayerInfo[playerid][pMembro] == 15) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 16; } else if(PlayerInfo[playerid][pMembro] == 16) { SetSpawnInfo(playerid, 2, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; } else if(PlayerInfo[playerid][pMembro] == 17) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 18; } else if(PlayerInfo[playerid][pMembro] == 18) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pMembro] == 19) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pMembro] == 20) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pMembro] == 21) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pLider] == 1) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 2) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 3) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 4) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 5) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 6) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 7) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 8) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 9) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 10) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 11) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 12) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 22; } else if(PlayerInfo[playerid][pLider] == 13) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 20; } else if(PlayerInfo[playerid][pLider] == 14) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 15; } else if(PlayerInfo[playerid][pLider] == 15) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 16; } else if(PlayerInfo[playerid][pLider] == 16) { SetSpawnInfo(playerid, 2, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; } else if(PlayerInfo[playerid][pLider] == 17) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 18; } else if(PlayerInfo[playerid][pLider] == 18) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pLider] == 19) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pLider] == 20) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pLider] == 21) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 19; } SpawnPlayer(playerid); } } if(PlayerInfo[playerid][pSkin] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); } else { if(PlayerInfo[playerid][pSex] == 1) { SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); } else { PlayerInfo[playerid][pSkin] = 41; SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); } } TextDrawHideForAll(Reloginho1); TextDrawShowForPlayer(playerid, Reloginho1); TextDrawHideForAll(Reloginho2); TextDrawShowForPlayer(playerid, Reloginho2); SetPlayerWeapons(playerid); SetPlayerSpawn(playerid); SetPlayerToTeamColor(playerid); PlayerFixRadio(playerid); return 1; }
Me pergunto o mesmo O_O
Код:
public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) //teste bot { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); //Obtendo o nome do(s) NPC(s). if(!strcmp(npcname, "bot_detrem", true)) //Checando se o nome do NPC й MeuPrimeiroNPC { PutPlayerInVehicle(playerid, trembot, 0); //Colocar o NPC dentro do veнculo que criamos para isso. SetPlayerSkin(playerid, 61); } if(!strcmp(npcname, "bot_onibus", true))//ONIBUS BOT { PutPlayerInVehicle(playerid, NPCBus, 0); SetPlayerSkin(playerid, 61); } return 1; } if(sincronizando[playerid] == 1) { return 1; } gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team if (gTeam[playerid] == 4) //medic / criminal reset team { gTeam[playerid] = 3; } if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_LIGHTRED, "AdmCmd: Vocк foi kickado Automaticamente, Motivo: Spawn sem login"); SendClientMessage(playerid, COLOR_LIGHTRED,"Vocк foi kickado do servidor, e nгo o contrarie novamente"); Kick(playerid); return 1; } CheckInfoOrg(playerid); if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLider] < 1) { MedicBill[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo foi aprovado pelo lнder, agora й um Civil !"); PlayerInfo[playerid][pTeam] = 3; gTeam[playerid] = 3; if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 41; } SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); SpawnPlayer(playerid); } if(gTeam[playerid] == 5) { if(PlayerInfo[playerid][pMembro] < 1) { MedicBill[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo faz parte de uma familia, agora й um Civil !"); PlayerInfo[playerid][pTeam] = 3; gTeam[playerid] = 3; if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 41; } SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); SpawnPlayer(playerid); } } if(gTeam[playerid] == 10) { if(PlayerInfo[playerid][pMembro] != 8) { MedicBill[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo faz parte de uma agencia, й um Civil !"); PlayerInfo[playerid][pTeam] = 3; gTeam[playerid] = 3; if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 41; } SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); SpawnPlayer(playerid); } } if(gTeam[playerid] == 2 && PlayerInfo[playerid][pMembro] > 3) { MedicBill[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo й mais um oficial, й um Civil !"); PlayerInfo[playerid][pTeam] = 3; gTeam[playerid] = 3; if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 41; } SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); SpawnPlayer(playerid); } if(gTeam[playerid] == 3) { if(PlayerInfo[playerid][pMembro] > 0 || PlayerInfo[playerid][pLider] > 0) { MedicBill[playerid] = 0; if(PlayerInfo[playerid][pMembro] == 1) { SetSpawnInfo(playerid, 2, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; } else if(PlayerInfo[playerid][pMembro] == 2) { SetSpawnInfo(playerid, 2, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; } else if(PlayerInfo[playerid][pMembro] == 3) { SetSpawnInfo(playerid, 2, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; } else if(PlayerInfo[playerid][pMembro] == 4) { SetSpawnInfo(playerid, 1, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; } else if(PlayerInfo[playerid][pMembro] == 5) { SetSpawnInfo(playerid, 5, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; } else if(PlayerInfo[playerid][pMembro] == 6) { SetSpawnInfo(playerid, 5, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; } else if(PlayerInfo[playerid][pMembro] == 8) { SetSpawnInfo(playerid, 10, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; } else if(PlayerInfo[playerid][pMembro] == 9) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; } else if(PlayerInfo[playerid][pMembro] == 10) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; } else if(PlayerInfo[playerid][pMembro] == 11) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; } else if(PlayerInfo[playerid][pMembro] == 12) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 22; } else if(PlayerInfo[playerid][pMembro] == 13) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 20; } else if(PlayerInfo[playerid][pMembro] == 14) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 15; } else if(PlayerInfo[playerid][pMembro] == 15) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 16; } else if(PlayerInfo[playerid][pMembro] == 16) { SetSpawnInfo(playerid, 2, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; } else if(PlayerInfo[playerid][pMembro] == 17) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 18; } else if(PlayerInfo[playerid][pMembro] == 18) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pMembro] == 19) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pMembro] == 20) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pMembro] == 21) { SetSpawnInfo(playerid, 12, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pLider] == 1) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 2) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 3) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 4) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 5) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 6) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 7) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 8) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 9) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 10) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 11) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; } else if(PlayerInfo[playerid][pLider] == 12) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 22; } else if(PlayerInfo[playerid][pLider] == 13) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 20; } else if(PlayerInfo[playerid][pLider] == 14) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 15; } else if(PlayerInfo[playerid][pLider] == 15) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 16; } else if(PlayerInfo[playerid][pLider] == 16) { SetSpawnInfo(playerid, 2, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; } else if(PlayerInfo[playerid][pLider] == 17) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 18; } else if(PlayerInfo[playerid][pLider] == 18) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pLider] == 19) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pLider] == 20) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 19; } else if(PlayerInfo[playerid][pLider] == 21) { SetSpawnInfo(playerid, 11, PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 19; } SpawnPlayer(playerid); } } if(PlayerInfo[playerid][pSkin] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); } else { if(PlayerInfo[playerid][pSex] == 1) { SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); } else { PlayerInfo[playerid][pSkin] = 41; SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); } } TextDrawHideForAll(Reloginho1); TextDrawShowForPlayer(playerid, Reloginho1); TextDrawHideForAll(Reloginho2); TextDrawShowForPlayer(playerid, Reloginho2); SetPlayerWeapons(playerid); SetPlayerSpawn(playerid); SetPlayerToTeamColor(playerid); PlayerFixRadio(playerid); return 1; } |
SetTimer("IrHospital", 4300, false);
forward IrHospital(playerid); public IrHospital(playerid) { SetPlayerPos(playerid, X, Y, Z); //Troque o "X", o "Y" e o "Z" pelas coordenadas do hospital. return 1; }