03.03.2014, 21:44
Ajudei? + Rep.
Tenta assim:
Tenta assim:
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID) // Verifica se alguem matou o player
{
if(Faleceu[playerid])
{
return 1;
}
TheEvenT[playerid] = false;
if(TheEvenT[killerid] == true)
{
if(EventoRecarregarLife == true)
{
SetPlayerHealth (killerid , 50.0);
SetPlayerArmour (killerid , 50.0);
}
}
new rtext[50];
switch(reason)
{
case 0: { rtext = "Soco"; }
case 1: { rtext = "Soco Ingles"; }
case 2: { rtext = "Taco de Golfe"; }
case 3: { rtext = "Cassetete"; }
case 4: { rtext = "Faca";}
case 5: { rtext = "Bastгo de Baseball"; }
case 6: { rtext = "Pб"; }
case 7: { rtext = "Taco de Bilhar"; }
case 8: { rtext = "Katana"; }
case 9: { rtext = "Serra Eletrica"; }
case 10: { rtext = "Pinto de borracha duplo"; }
case 11: { rtext = "Pinto de borracha"; }
case 12: { rtext = "Vibrador"; }
case 13: { rtext = "Vibrador"; }
case 14: { rtext = "Buquк de Flores"; }
case 15: { rtext = "Bengala"; }
case 16: { rtext = "Granada"; }
case 17: { rtext = "Bomba de Gas"; }
case 18: { rtext = "Coqtel Molotov"; }
case 22: { rtext = "9mm"; }
case 23: { rtext = "9mm Silenciadora"; }
case 24: { rtext = "Desert Eagle"; }
case 25: { rtext = "Shotgun"; }
case 26: { rtext = "Sawn Off"; }
case 27: { rtext = "Combat Shotgun"; }
case 28: { rtext = "Micro Uzi"; }
case 29: { rtext = "MP5";}
case 30: { rtext = "AK-47"; }
case 31: { rtext = "M4"; }
case 32: { rtext = "Tec-9"; }
case 33: { rtext = "Rifle"; }
case 34: { rtext = "Sniper Rifle"; }
case 35: { rtext = "Bazooka"; }
case 36: { rtext = "Bazooka Teleguiada"; }
case 37: { rtext = "Lanзa Chamas";}
case 38: { rtext = "Minigun"; }
case 39: { rtext = "Bombas Armadas"; }
case 40: { rtext = "Detonador"; }
case 41: { rtext = "Spray"; }
case 42: { rtext = "Extintor de Incкndios"; }
case 47: { rtext = "FAKE PISTOL"; }
case 49: { rtext = "Atropelado"; }
case 50: { rtext = "Hйlices de um Helicуptero"; }
case 51: { rtext = "Explosгo"; }
case 53: { rtext = "Morreu Afogado"; }
case 54: { rtext = "Caiu de um Lugar Alto"; }
case 255: { rtext = "Morreu Sozinho"; }
default: { rtext = "Ninguкm sabe como!"; }
}
new pStr[85];
format(pStr, sizeof(pStr), "(( Vocк matou o jogador %s. (%s) ))", Nome(playerid), rtext);
SendClientMessage(killerid, 0xE0FFFFFF, pStr);
format(pStr, sizeof(pStr), "(( Vocк foi morto por %s. (%s) ))", Nome(killerid), rtext);
SendClientMessage(playerid, 0xE0FFFFFF, pStr);
// Player Que Matar
//PlayerInfo[killerid][Matou]++;
PC_DarDinheiro(killerid, 500);
SetPlayerScore(killerid, PlayerInfo[killerid][Matou] += 1);
SetPlayerWantedLevel(killerid, (GetPlayerWantedLevel(killerid)) + 1);
// Player Que Morrer
PlayerInfo[playerid][Morreu]++;
PC_DarDinheiro(playerid, -50);
SetPlayerScore(playerid, PlayerInfo[playerid][Matou] -= 1);
GameTextForPlayer(playerid, "Se Fodeu!", 5000, 2);
if(PlayerInfo[killerid][pGang] == TEAM_COPS && GetPlayerWantedLevel(playerid) > 0)
{
GameTextForPlayer(killerid, "~w~Suspeito ~r~MORTO", 5000, 1);
SendClientMessage(killerid, VERDE, "Vocк ganhou R$ 1000 reais por ter matado um procurado!");
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
PC_DarDinheiro(killerid, 1000);
pMorreuProcurado[playerid] = 1;
SendClientMessage(playerid, COLOR_RED, "Vocк foi morto por um policial e serб preso!");
}
if(TaNoX1[playerid] == true)
{
new string[50 + MAX_PLAYER_NAME], Nome2[40][MAX_PLAYERS], Nomi[40][MAX_PLAYERS];
TaNoX1[playerid] = false;
TaNoX1[killerid] = false;
GetPlayerName(killerid, Nomi[killerid], 40);
GetPlayerName(playerid, Nome2[playerid], 40);
format(string, sizeof(string), "[INFO] Mr.%s Ganhou no x1 contra %s.", Nomi[killerid], Nome2[killerid]);
SendClientMessageToAll(-1, string);
Quantos = 0;
}
}
if(Faleceu[playerid])
{
return 1;
}
new
informacaoArma[4],
Float:coordenadaPickup[5];
GetPlayerPos(playerid,coordenadaPickup[0],coordenadaPickup[1],coordenadaPickup[2]);
GetPlayerFacingAngle(playerid,coordenadaPickup[3]);
for(new x = 0; x < 13; x++)
{
GetPlayerWeaponData(playerid,x,informacaoArma[0],informacaoArma[1]);
if(informacaoArma[0] != 0 && informacaoArma[1] > 0)
{
switch(informacaoArma[0]) {
case 1: informacaoArma[2] = 331;
case 2..8: informacaoArma[2] = informacaoArma[0]+331;
case 9: informacaoArma[2] = 341;
case 10..15: informacaoArma[2] = informacaoArma[0]+311;
case 16..18: informacaoArma[2] = informacaoArma[0]+326;
case 22..29: informacaoArma[2] = informacaoArma[0]+324;
case 30,31: informacaoArma[2] = informacaoArma[0]+325;
case 32: informacaoArma[2] = 372;
case 33..45: informacaoArma[2] = informacaoArma[0]+324;
case 46: informacaoArma[2] = 371;
}
informacaoArma[3] = CreatePickup(informacaoArma[2],3,coordenadaPickup[0]+ ( random( 10 ) * floatsin(-coordenadaPickup[4], degrees ) ),coordenadaPickup[1]+ ( random( 10 ) * floatcos( -coordenadaPickup[4], degrees ) ),coordenadaPickup[2],-1);
armaPickup[informacaoArma[3]] = informacaoArma[0];
pickupFerramentas[informacaoArma[3]] = informacaoArma[1];
armamentoPickup[informacaoArma[3]] = SetTimerEx("DestroyPickupEx",15000,false,"i",informacaoArma[3]);
coordenadaPickup[4] = random(360);
}
}
informacaoArma[3] = CreatePickup(1240,1,coordenadaPickup[0],coordenadaPickup[1],coordenadaPickup[2],-1);
armamentoPickup[informacaoArma[3]] = SetTimerEx("DestroyPickupEx",15000,false,"i",informacaoArma[3]);
SendDeathMessage(killerid, playerid, reason);
return 1;
}