21.08.2013, 23:22
Nгo to vendo nada na callback OnPlayerDeath que interrompa isso, olhem:
Код:
public OnPlayerDeath(playerid, killerid, reason) { Hospital[playerid] = 1; new string[256]; RemovePlayerAttachedObject(playerid,3); RemovePlayerAttachedObject(playerid, 3); new Float:px,Float:py,Float:pz; PlayerInactivity[playerid] = 0; //DropWeapons(playerid); //DropVida(playerid); //DropGrana(playerid); gPlayerSpawned[playerid] = 0; PlayerInfo[playerid][pLocal] = 255; SetPlayerPos(playerid, 1176.9781,-1323.1548,14.0480); SetPlayerInterior(playerid, 0); GetPlayerPos(playerid, px, py, pz); spawnado[playerid] = 0; if(usandolavacarro == playerid) { SetVehicleToRespawn(GetPlayerVehicleID(playerid)); usandolavacarro = -1; Update3DTextLabelText(textoentrada, COR_AZULZAO, "Ninguйm estб usando o Lava Rбpido agora, o preзo й de R$ 20,00\n(/lavarcarro)"); } if (gPlayerTerminal[playerid] != 0) { BusrouteEnd(playerid); } SetPlayerCriminal(killerid, 255, "Assasinato"); 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[playerid][pMembro] == 23 || PlayerInfo[playerid][pLider] == 23) { Territorio[FARCmortos] += 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[playerid][pMembro] == 23 || PlayerInfo[playerid][pLider] == 23) { Territorio[FARCmortos] += 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(PlayerInfo[playerid][pMembro] == 23 || PlayerInfo[playerid][pLider] == 23) { Territorio[FARCmortos] += 1; } } if(PlayerInfo[killerid][pMembro] == 23 || PlayerInfo[killerid][pLider] == 23) { 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(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15) { Territorio[almortos] += 1; } } } //==================================[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 ROTA, 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) { //SendClientMessageToAll(COLOR_WHITE, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assaalto ao Banco{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"); 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); ClearAnimations(playerid); ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0; } if(ProvocoLot[playerid] == 1) { //SendClientMessageToAll(COLOR_WHITE, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assaalto а Lotйrica{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"); 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); ClearAnimations(playerid); ProvocoLot[playerid] = 0; roubando[playerid] = 0; roubolot = 0; KillTimer(tempolot); temporoubolot = 0; } if(ProvocoLoja1[playerid] == 1) { //SendClientMessageToAll(COLOR_WHITE, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assaalto а Loja de Armas{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"); 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); ClearAnimations(playerid); ProvocoLoja1[playerid] = 0; roubando[playerid] = 0; rouboloja1 = 0; KillTimer(tempoloja1); temporouboloja1 = 0; } if(ProvocoLoja2[playerid] == 1) { //SendClientMessageToAll(COLOR_WHITE, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assaalto а Ammu Nation{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"); format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Ammu Nation ! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ClearAnimations(playerid); ProvocoLoja2[playerid] = 0; roubando[playerid] = 0; rouboloja2 = 0; KillTimer(tempoloja2); temporouboloja2 = 0; } if(ProvocoBinco[playerid] == 1) { //SendClientMessageToAll(COLOR_WHITE, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assaalto а Binco{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"); format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Binco ! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ClearAnimations(playerid); ProvocoBinco[playerid] = 0; roubando[playerid] = 0; roubobinco = 0; KillTimer(tempobinco); temporoubobinco = 0; } if(ProvocoZip[playerid] == 1) { //SendClientMessageToAll(COLOR_WHITE, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assaalto а Zip{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"); format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Zip ! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ClearAnimations(playerid); ProvocoZip[playerid] = 0; roubando[playerid] = 0; roubozip = 0; KillTimer(tempozip); temporoubozip = 0; } if(ProvocoVictim[playerid] == 1) { //SendClientMessageToAll(COLOR_WHITE, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assaalto а Victim{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"); format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre da Victim ! ID:[%d]", PlayerName(playerid), NomeORG(playerid) , playerid); SendClientMessageToAll(GetPlayerColor(playerid), gstring); ClearAnimations(playerid); ProvocoVictim[playerid] = 0; roubando[playerid] = 0; roubovictim = 0; KillTimer(tempovictim); temporoubobinco = 0; } //=======================[FIM ROUBAR]======================== 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(ProvocoAero[playerid] == 1) { GangZoneStopFlashForAll(GZAero); GangZoneShowForAll(GZAero, 0xFFFFFF96); GuerranoAero = 0; ProvocoAero[playerid] = 0; donoaero = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraAero); } if(ProvocoPark[playerid] == 1) { GangZoneStopFlashForAll(GZPark); GangZoneShowForAll(GZPark, 0xFFFFFF96); GuerranoPark = 0; ProvocoPark[playerid] = 0; donopark = 0; Dominando[playerid] = 0; KillTimer(TempoGuerraPark); } if(GetPlayerState(killerid) == 2) { GetPlayerName(killerid,kickname,sizeof(kickname)); format(gstring,sizeof(gstring),"AdmCmd: %s ID:[%d] serб punido por cometer DB em %s ID:[%d].",kickname,killerid,PlayerName(playerid),playerid); SendClientMessageToAll(COLOR_LIGHTRED,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 (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11) { DisablePlayerCheckpoint(playerid); gPlayerCheckpointStatus[playerid] = CHECKPOINT_Nenhum; } new caller = Mobile[playerid]; new name[MAX_PLAYER_NAME]; 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(PlayerInfo[playerid][pHeadValue] > 0) { if(IsPlayerConnected(killerid)) { if(GetPlayerOrg(killerid) == 8 || GetPlayerOrg(killerid) == 22) { if(GoChase[killerid] == playerid) { if(GetPlayerOrg(killerid) == 8) { CHitman++; } if(GetPlayerOrg(killerid) == 22) { CTriad++; } ConsumingMoney[killerid] = 1; new killer[MAX_PLAYER_NAME]; GetPlayerName(killerid, killer, sizeof(killer)); GivePlayerMoneyEx(killerid, PlayerInfo[playerid][pHeadValue]); format(string,128,"<< Assasino %s Completou o contrato em %s pelo preзo de R$%d >>",killer,name,PlayerInfo[playerid][pHeadValue]); SendFamilyMessage(GetPlayerOrg(killerid), COLOR_YELLOW, string); format(string,128,"<< O Matador %s matou vocк por um contrato de R$%d, entгo nгo foi DM. >>",killer,PlayerInfo[playerid][pHeadValue]); SendClientMessage(playerid, TEAM_GROVE_COLOR, string); format(string,128,"<< O Matador %s matou o seu contrato (%s) pelo preзo de: R$%d>>",killer,name,PlayerInfo[playerid][pHeadValue]); SendClientMessage(ColocouContrato, COLOR_DBLUE, string); PlayerInfo[playerid][pHeadValue] = 0; GotHit[playerid] = 0; GetChased[playerid] = 999; GoChase[killerid] = 999; } } } } if(PlayerInfo[killerid][pHeadValue] > 0) { if(IsPlayerConnected(playerid)) { if(GetPlayerOrg(playerid) == 8 || GetPlayerOrg(playerid) == 22) { if(GoChase[playerid] == killerid) { ConsumingMoney[playerid] = 1; format(gstring,128,"<< O Matador %s foi morto por %s, e perdeu o seu contrato >>",PlayerName(playerid),PlayerName(killerid)); SendFamilyMessage(GetPlayerOrg(playerid), COLOR_YELLOW, gstring); PlayerInfo[killerid][pHeadValue] = 0; GotHit[killerid] = 0; GetChased[killerid] = 999; GoChase[playerid] = 999; } } } } killerid = INVALID_PLAYER_ID; SetPlayerColor(playerid,COLOR_GRAD2); }