Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && PlayerInfo[playerid][pLogado] > 0)
- {
- if(PlayerInfo[playerid][pHeadValue] > 0 && PlayerInfo[killerid][pMember] == 11 || PlayerInfo[killerid][pLeader] == 11)
- {
- if(GoChase[killerid] == playerid)
- {
- new string[256];
- new nomegay[MAX_PLAYER_NAME];
- new nomegay2[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nomegay, sizeof(nomegay));
- GetPlayerName(killerid, nomegay2, sizeof(nomegay2));
- new killer[MAX_PLAYER_NAME];
- GetPlayerName(killerid, killer, sizeof(killer));
- SafeGivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
- format(string,128,"* O assassino %s cumpriu o contrato à cabeça de %s e adquiriu um valor de R$%d",killer,nomegay,PlayerInfo[playerid][pHeadValue]);
- SendRadioMessage(11, TEAM_GROVE_COLOR, string);
- SendClientMessage(playerid, TEAM_GROVE_COLOR, "Um assassino cumpriu o contrato em você.");
- PlayerInfo[playerid][pHeadValue] = 0;
- GotHit[playerid] = 0;
- GetChased[playerid] = 999;
- GoChase[killerid] = 999;
- }
- }
- else
- {
- TogglePlayerControllable(playerid, 0);
- new rand;
- rand = random(sizeof(SpawnHP));
- PlayerInfo[playerid][pInt] = 1;
- PlayerInfo[playerid][pPos_x] = SpawnHP[rand][0];
- PlayerInfo[playerid][pPos_y] = SpawnHP[rand][1];
- PlayerInfo[playerid][pPos_z] = SpawnHP[rand][2];
- LoopingAnim(playerid, "CRACK","crckdeth2",4.0,0,0,0,1,1);//Anim de caido
- SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
- SetPlayerCameraPos(playerid, 1460.8494, -156.1998, 1003.7289);
- SetPlayerCameraLookAt(playerid, 1461.6353, -156.8163, 1003.3052);
- SetPlayerFacingAngle(playerid, 90.0);
- //acResetWeapons(playerid);
- FumandoDorgas[playerid] = 0;
- HavingBall[playerid] = 0;
- MortoPcop[playerid] = 0;
- PlayerInfo[playerid][pMaconha] = 0;
- PlayerInfo[playerid][pCocaina] = 0;
- PlayerInfo[playerid][pCrack] = 0;
- PlayerInfo[playerid][pLSD] = 0;
- if(HavingBall[playerid]) Baller = 999;
- //
- new string[255];
- new nomegay[MAX_PLAYER_NAME];
- new nomegay2[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nomegay, sizeof(nomegay));
- GetPlayerName(killerid, nomegay2, sizeof(nomegay2));
- //
- new rtext[128];
- if(reason == 0) { rtext = "a socos."; }
- else if(reason == 1) { rtext = "com um soco ingles."; }
- else if(reason == 2) { rtext = "com taco de Golfe"; }
- else if(reason == 3) { rtext = "com um cassetete."; }
- else if(reason == 4) { rtext = "com uma faca."; }
- else if(reason == 5) { rtext = "com um bastão de Baseball."; }
- else if(reason == 6) { rtext = "com uma pá."; }
- else if(reason == 7) { rtext = "com um taco de bilhar."; }
- else if(reason == 8) { rtext = "com uma Katana."; }
- else if(reason == 9) { rtext = "com uma Serra Eletrica"; }
- else if(reason == 10) { rtext = "com um Pinto de borracha duplo "; }
- else if(reason == 11) { rtext = "com um Pinto de borracha "; }
- else if(reason == 12) { rtext = "com um Vibrador "; }
- else if(reason == 13) { rtext = "com um Vibrador "; }
- else if(reason == 14) { rtext = "com um Buquê de Flores"; }
- else if(reason == 15) { rtext = "com uma Bengala"; }
- else if(reason == 16) { rtext = "com uma Granada"; }
- else if(reason == 17) { rtext = "com uma Bomba de Gas"; }
- else if(reason == 18) { rtext = "com um Coqtel Molotov"; }
- else if(reason == 22) { rtext = "com tiros de uma Colt45"; }
- else if(reason == 23) { rtext = "com tiros de uma Colt45 com Silenciador"; }
- else if(reason == 24) { rtext = "com tiros de uma Desert Eagle"; }
- else if(reason == 25) { rtext = "com tiros de uma Shotgun"; }
- else if(reason == 26) { rtext = "com tiros de uma Sawnoff"; }
- else if(reason == 27) { rtext = "com tiros de uma Combat Shotgun"; }
- else if(reason == 28) { rtext = "com tiros de uma Micro Uzi"; }
- else if(reason == 29) { rtext = "com tiros de uma MP5"; }
- else if(reason == 30) { rtext = "com tiros de uma AK-47"; }
- else if(reason == 31) { rtext = "com tiros de uma M4"; }
- else if(reason == 32) { rtext = "com tiros de uma Tec-9"; }
- else if(reason == 33) { rtext = "com tiros de uma Country Rifle"; }
- else if(reason == 34) { rtext = "com tiros de uma Sniper Rifle"; }
- else if(reason == 35) { rtext = "com tiros de uma BAZOOKA"; }
- else if(reason == 36) { rtext = "com tiros de uma BAZOOKA DE TIRO PERSEGUIDOR"; }
- else if(reason == 37) { rtext = "com um Lança Chamas"; }
- else if(reason == 38) { rtext = "com tiros de uma Minigun"; }
- else if(reason == 39) { rtext = "com Bombas Armadas"; }
- else if(reason == 40) { rtext = "com um Detonador"; }
- else if(reason == 41) { rtext = "com um Spray"; }
- else if(reason == 42) { rtext = "com um extintor de incendios"; }
- else if(reason == 47) { rtext = "FAKE PISTOL (( Sei la queporraéessa ))"; }
- else if(reason == 49) { rtext = "Atropelado "; }
- else if(reason == 50) { rtext = "nas hélices de um helicoptero"; }
- else if(reason == 51) { rtext = "com uma explosão"; }
- else if(reason == 53) { rtext = "morreu afogado. "; }
- else if(reason == 54) { rtext = "caiu de um lugar alto e morreu."; }
- else if(reason == 255) { rtext = " morreu sosinho"; }
- else { rtext = "morreu ninguem sabe como !"; }
- //
- if(reason < 53)
- {
- GetPlayerName(playerid, nomegay, sizeof(nomegay));
- GetPlayerName(killerid, nomegay2, sizeof(nomegay2));
- format(string, sizeof(string), "((%s te matou %s ))", nomegay2, rtext);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "((Você matou %s %s ))", nomegay, rtext);
- SendClientMessage(killerid, COLOR_WHITE, string);
- }
- if(reason > 52)
- {
- format(string, sizeof(string), "((Você %s ))", rtext);
- }
- //Chatkill Admins
- new gunname[32], STRloka[64], fName[MAX_PLAYER_NAME], sName[MAX_PLAYER_NAME];
- GetWeaponName(reason,gunname,sizeof(gunname));
- GetPlayerName(playerid,fName,MAX_PLAYER_NAME);
- GetPlayerName(killerid,sName,MAX_PLAYER_NAME);
- format(STRloka, sizeof(STRloka), "%s matou %s usando %s.", sName, fName, gunname);
- for(new lol; lol < MAX_PLAYERS; ++lol)
- {
- if(PlayerInfo[lol][pAdmin] >= 2)
- {
- SendClientMessage(lol,0x33AA33AA,STRloka);
- }
- return 1;
- }
- //
- //format(string, sizeof(string), " %s matou %s %s (ID: %d).", nomegay2, nomegay, rtext, reason);
- //ABroadCast(COLOR_YELLOW,string, 1);
- //SendAdminMessage(COLOR_LIGHTRED, string);
- new y2, m2, d2;
- new h2,mi2,s2;
- getdate(y2,m2,d2);
- gettime(h2,mi2,s2);
- format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Matou %s %s.",d2,m2,y2,h2,mi2,s2,nomegay2, nomegay, rtext);
- ChatKill(string);
- //Armas cair
- new Float:pPosX, Float:pPosY, Float:pPosZ;
- GetPlayerPos(playerid, pPosX, pPosY, pPosZ);
- /*if(!IsACop(playerid))
- {
- if(admtrampando[playerid] == 0)
- {
- for(new i_slot = 0, gun, ammo; i_slot != 12; i_slot++)
- {
- GetPlayerWeaponData(playerid, i_slot, gun, ammo);
- if(gun != 0 && ammo != 0) CreateDroppedGun(gun, ammo, pPosX+random(2)-random(2), pPosY+random(2)-random(2), pPosZ);
- }
- }
- }*/
- //Armas Cair
- SafeRemovePlayerFromVehicle(playerid);
- ResetPlayerWeapons(playerid);
- SafeResetPlayerWeapons(playerid);
- //new string[128],
- new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME]; //deathreason[20];
- new y, m, d, h,mi,s;
- getdate(y,m,d);
- gettime(h,mi,s);
- GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(killerid, name2, sizeof(name2));
- if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
- if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
- if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
- if(IsPlayerAttachedObjectSlotUsed(playerid,4)) RemovePlayerAttachedObject(playerid,4);
- if(IsPlayerAttachedObjectSlotUsed(playerid,5)) RemovePlayerAttachedObject(playerid,5);
- if(IsPlayerAttachedObjectSlotUsed(playerid,6)) RemovePlayerAttachedObject(playerid,6);
- if(IsPlayerAttachedObjectSlotUsed(playerid,7)) RemovePlayerAttachedObject(playerid,7);
- if(IsPlayerAttachedObjectSlotUsed(playerid,8)) RemovePlayerAttachedObject(playerid,8);
- if(IsPlayerAttachedObjectSlotUsed(playerid,9)) RemovePlayerAttachedObject(playerid,9);
- Delete3DTextLabel(Description[playerid]);
- Update3DTextLabelText(Description[playerid], 0x00000000, " ");
- Attach3DTextLabelToPlayer(Description[playerid],playerid, 0.0, 0.0, 0.6)
- Description[playerid] = Create3DTextLabel(" ", 0x00000000, 0.0, 0.0, 0.0, 50.0, -1, 0);
- if(PlayerInfo[playerid][pAdmin] <= 3000 || admtrampando[playerid] == 0)
- {
- new Float:Pos[3];
- GetPlayerPos(playerid, Pos[0],Pos[1],Pos[2]);
- morteInfo[playerid][mPosX] = Pos[0];
- morteInfo[playerid][mPosY] = Pos[1];
- morteInfo[playerid][mPosZ] = Pos[2];
- morteInfo[playerid][mVirWorld] = GetPlayerVirtualWorld(playerid);
- morteInfo[playerid][mInterior] = GetPlayerInterior(playerid);
- Morto[playerid] = 1;
- new strg[150];
- SetPlayerInterior(playerid, 3);
- PlayerInfo[playerid][pInt] = 3;
- new level = PlayerInfo[playerid][pLevel];
- SetPlayerFacingAngle(playerid, 180.0);
- PlayerInfo[playerid][pJailTime] = level * 60;
- new hosp = PlayerInfo[playerid][pJailTime];
- format(strg, sizeof(strg), "Você está no Hospital por %d segundos.", hosp);
- SendClientMessage(playerid, COLOR_WHITE, strg);
- PlayerInfo[playerid][pJailed] = 7;
- Caido[playerid] = 1;
- SetPlayerHealth(playerid, 15);
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "Por estar em serviço admin você não foi ao Hospital.");
- }
- if(Attached[playerid] == 1) StopPlayerHoldingObject(playerid);
- TextDrawHideForPlayer(playerid, Textdraw39[playerid]);
- gPlayerSpawned[playerid] = 0;
- if(admtrampando[playerid] >= 1) { admtrampando[playerid] = 0; }
- MedicBill[playerid] = 1;
- if(gPlayerUsingLoopingAnim[playerid]) {
- gPlayerUsingLoopingAnim[playerid] = 0;
- }
- gPlayerSpawned[playerid] = 1;
- SafeTime[playerid] = 60;
- Checked[playerid] = 1;
- PlayerGotSpottedRecently[playerid] = 1;
- SetTimerEx("ResetAcWarn",20000,false, "i", playerid);
- if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 20)
- {
- DisablePlayerCheckpoint(playerid);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
- }
- new caller = Mobile[playerid];
- if(caller != 255)
- {
- if(caller < 255)
- {
- SendClientMessage(caller, COLOR_GRAD2, " Linha caiu (...)");
- CellTime[caller] = 0;
- CellTime[playerid] = 0;
- Mobile[caller] = 255;
- }
- Mobile[playerid] = 255;
- CellTime[playerid] = 0;
- }
- PlayerInfo[playerid][pMaskuse] = 0;
- if (BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0)
- {
- if (BusrouteEast[playerid][0] != 0) BusrouteEnd(playerid, BusrouteEast[playerid][1]);
- else if (BusrouteWest[playerid][0] != 0) BusrouteEnd(playerid, BusrouteWest[playerid][1]);
- else BusrouteEnd(playerid, 0);
- }
- }
- if(IsACop(killerid) && PlayerInfo[killerid][pDuty] == 1) // POLICIAL em serviço
- {
- MortoPcop[playerid] = 1; //O cara que morreu vai para a Prisão após sair do Hospital
- }
- //======================================================================
- // SISTEMA DE SU AUTOMATICO AO MATAR
- //======================================================================
- /*if(IsANorteno(killerid) && GoChase[killerid] != playerid)
- {
- }
- if(IsACop(killerid) && PlayerInfo[killerid][pDuty] == 1) // POLICIAL em serviço
- {
- MortoPcop[playerid] = 1;
- }
- if(IsACop(killerid) && PlayerInfo[killerid][pDuty] == 0) //POLICIAL fora de serviço matou alguém
- {
- PlayerInfo[killerid][pWantedLevel] += 8;
- SetPlayerCriminalEx(killerid, 255, "Homicidio");
- }
- if(IsAGang(killerid)) //Gangster matou alguém
- {
- PlayerInfo[killerid][pWantedLevel] += 8;
- SetPlayerCriminalEx(killerid, 255, "Homicidio");
- }
- if(PlayerInfo[killerid][pMember] == 0 && PlayerInfo[killerid][pLeader] == 0) //Civil matou alguém
- {
- PlayerInfo[killerid][pWantedLevel] += 8;
- SetPlayerCriminalEx(killerid, 255, "Homicidio");
- }*/
- //======================================================================
- if(RouboNoCaixa[playerid] == 1)
- {
- RouboNoCaixa[playerid] = 0;
- RoubandoCaixa = 0;
- KillTimer(TempoRouboCaixa);
- }
- if(RouboNoArmazem[playerid] == 1)
- {
- RouboNoArmazem[playerid] = 0;
- RoubandoArmazem = 0;
- CRArmazem[playerid] = 0;
- KillTimer(TempoRouboArmazem);
- }
- //
- killerid = INVALID_PLAYER_ID;
- SetRealMoney(playerid, ScriptMoney[playerid]);
- }
- return 0x01;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement