07.08.2015, 14:48
Estou Com Problemas Quando Uma Pessoa Mata a Outra Aparece Assim , - Mentos_WizzarD (Caverinha) Lucas_Dias
Mata Certinho Mais Nao Esta Aparecendo As Armas
Print de Como Fica Quando Mata : http://imgur.com/CtBHvmS
Mata Certinho Mais Nao Esta Aparecendo As Armas
Public OnPlayerSpawn
PHP код:
public OnPlayerSpawn(playerid)
{
SetPlayerTeam(playerid, 1);
SetPVarInt(playerid, "mortoPor", INVALID_PLAYER_ID);
PlayerTextDrawShow(playerid, INFO[0][playerid]);
PlayerTextDrawShow(playerid, INFO[1][playerid]);
PlayerTextDrawShow(playerid, INFO[2][playerid]);
PlayerTextDrawShow(playerid, INFO[3][playerid]);
PlayerTextDrawShow(playerid, INFO[4][playerid]);
PlayerTextDrawShow(playerid, INFO[5][playerid]);
PlayerTextDrawShow(playerid, INFO[6][playerid]);
PlayerTextDrawShow(playerid, INFO[7][playerid]);
PlayerTextDrawShow(playerid, INFO[8][playerid]);
GivePlayerWeapon(playerid, 24,999);
GivePlayerWeapon(playerid, 34,999);
SetPlayerInterior(playerid,0);
spree[playerid] = 0;
////////////////////////////////////////////////////////////////
DesapareceTexts(playerid);
return 1;
}
Public OnPlayerDeath
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
if (GetPVarInt(playerid, "mortoPor") != INVALID_PLAYER_ID)
{
killerid = GetPVarInt(playerid, "mortoPor");
}
SendDeathMessage(killerid, playerid, reason);
new s = random(5);
switch(s)
{
case 0: SetPlayerScore(killerid, GetPlayerScore(killerid) + 5);
case 1: SetPlayerScore(killerid, GetPlayerScore(killerid) + 10);
case 2: SetPlayerScore(killerid, GetPlayerScore(killerid) + 15);
case 3: SetPlayerScore(killerid, GetPlayerScore(killerid) + 18);
case 4: SetPlayerScore(killerid, GetPlayerScore(killerid) + 20);
}
pInfo[killerid][Matou]++;
pInfo[playerid][Morreu]++;
spree[killerid] ++;
switch(spree[killerid])
{
case 1: GameTextForPlayer(killerid,"~y~Mandou Pra Vala!",3000,1);
case 2: GameTextForPlayer(killerid,"~y~Double Kill",3000,1);
case 3: GameTextForPlayer(killerid,"~y~Triple Kill",3000,1);
case 4: GameTextForPlayer(killerid,"~y~Multi Kill",3000,1);
case 6: GameTextForPlayer(killerid,"~y~Triple Kill x2",3000,1);
case 8: GameTextForPlayer(killerid,"~y~Multi Kill x2",3000,1);
case 10: GameTextForPlayer(killerid,"~y~Monster Killer!",3000,1);
case 15: GameTextForPlayer(killerid,"~y~Holy Shit!",3000,1);
case 20: GameTextForPlayer(killerid,"~y~Insane Killer!",3000,1);
case 30: GameTextForPlayer(killerid,"~y~Fuckyea Killer!",3000,1);
case 50: GameTextForPlayer(killerid,"~y~HARD Killer!",3000,1);
}
return 1;
}
Public OnGiveDamage
PHP код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
{
switch(weaponid)
{
case 24:amount = 32.0; //Eagle
case 25:amount = 17.0; //Shotgun
case 27:amount = 15.0; //Combat Shotgun
case 29:amount = 5.0; //MP5
case 30:amount = 7.0; //AK-47
case 31:amount = 7.0; //M4
case 42:amount = 0.0; //Extintor - Bombeiros
case 9:amount = 0.0; //Serra - Bombeiros
case 34:amount = 100.0;
}
PlayerPlaySound(damagedid, 17804, 0.0, 0.0, 0.0);
PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0);
new Float:Life, Float:Coleete, Float:Dano;
GetPlayerArmour(damagedid, Coleete);
GetPlayerHealth(damagedid, Life);
if(Coleete > 0)
{
if(amount > Coleete)
{
Dano = amount - Coleete;
Life = Life - Dano;
if(Life <= 0)
{
SetPVarInt(damagedid, "mortoPor", playerid);
}
SetPlayerArmour(damagedid, 0.0);
SetPlayerHealth(damagedid, Life);
}
else
{
Coleete = Coleete - amount;
SetPlayerArmour(damagedid, Coleete);
}
}
else if(Coleete < 1)
{
Life = Life - amount;
if(Life <= 0)
{
SetPVarInt(damagedid, "mortoPor", playerid);
}
SetPlayerHealth(damagedid, Life);
}
return 1;
}