SetPlayerTeam - Equal Death reason suicide. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetPlayerTeam - Equal Death reason suicide. (
/showthread.php?tid=559345)
SetPlayerTeam - Equal Death reason suicide. -
RaphaelCaldas - 22.01.2015
When 2(Two) players are in the same team(SetPlayerTeam), the reason that shows on the chat kill when they kill each other is suicide, how can i make it shows that One Killed Each Other?
I've try to make the SetPlayerTeam be different when he had 0.0 Life, But It Didn't Work.
I've made a Anti hacker For Health/Armour, but i just need to fix this thing.
Look at This ScreenShot:
Re: SetPlayerTeam - Equal Death reason suicide. -
RaphaelCaldas - 22.01.2015
Bump
Re: SetPlayerTeam - Equal Death reason suicide. -
zT KiNgKoNg - 22.01.2015
We
CANNOT help you without the code that you've created, If you haven't created anything and want to request code then there's a topic for you to do so.
Re: SetPlayerTeam - Equal Death reason suicide. -
RaphaelCaldas - 23.01.2015
Here's The Code.
I Cant Make SendDeathMessage Work.
pawn Код:
// OnPlayerSpawn
SetPlayerTeam(playerid, 5)
// OnPlayerDeath
if(pKillID[playerid] != INVALID_PLAYER_ID)
{
killerid = pKillID[playerid]; // 0
SendDeathMessage(killerid,playerid,GetPlayerWeapon(killerid)),
pKillID[playerid] = INVALID_PLAYER_ID;
}
// OnPlayerGiveDamage
if(damagedid != INVALID_PLAYER_ID)
{
new Float:health, Float:armour;
GetPlayerHealth(damagedid, health);
GetPlayerArmour(damagedid, armour);
if(armour > 0.0)
{
armour -= amount;
if(armour < 0.0) {
SetPlayerArmour(damagedid, 0.0);
if(health+(armour) <= 0.0) pKillID[damagedid] = playerid;
SetPlayerHealth(damagedid, health+(armour));
return true;
}
SetPlayerArmour(damagedid, armour);
}
else{
health -= amount;
if(health <= 0.0) pKillID[damagedid] = playerid;
SetPlayerHealth(damagedid, health);
}
}
Re: SetPlayerTeam - Equal Death reason suicide. -
RaphaelCaldas - 23.01.2015
bump
Re: SetPlayerTeam - Equal Death reason suicide. -
JonathanFeitosa - 23.01.2015
Hook method 7?
Re: SetPlayerTeam - Equal Death reason suicide. -
GGW - 23.01.2015
PHP код:
SendDeathMessage(killerid,playerid,GetPlayerWeapon(killerid)), pKillID[playerid] = INVALID_PLAYER_ID;
Should Be Like This
PHP код:
SendDeathMessage(killerid, playerid, reason);
Re: SetPlayerTeam - Equal Death reason suicide. -
RaphaelCaldas - 23.01.2015
BUMP