SA-MP Forums Archive
When the Player Killes Another Player - 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: When the Player Killes Another Player (/showthread.php?tid=366990)



When the Player Killes Another Player - Geeboi_Mehdi - 08.08.2012

When One of they other Players Kill Another Player I want it to Take 100$ from The Player that Died And go to The Person The Killed the Person
*If you Helped me thank You You will Get REP


Respuesta: When the Player Killes Another Player - [DOG]irinel1996 - 08.08.2012

Here you have:
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    GivePlayerMoney(playerid,-100); //Rests 100$ even if he dies because of a explosion. If you want change that tell me.
    if(IsPlayerConnected(killerid)) { GivePlayerMoney(killerid,100); }
    return 1;
}
Best regards!


Re: When the Player Killes Another Player - Geeboi_Mehdi - 08.08.2012

thanx for Helping REp 1 Can u make it like if the Player Gets Shot?


Re: When the Player Killes Another Player - Dawnz - 08.08.2012

Quote:
Originally Posted by Geeboi_Mehdi
View Post
thanx for Helping REp 1 Can u make it like if the Player Gets Shot?
Suggest you to have a look at this HERE,
Hope that helps.


Re: When the Player Killes Another Player - Killer#Mummy - 08.08.2012

pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
    GivePlayerMoney(playerid,-100);
GivePlayerMoney(killerid,100);
}

    return 1;
}



Re: When the Player Killes Another Player - Geeboi_Mehdi - 08.08.2012

Thanx Man Rep 1 for You


Re: When the Player Killes Another Player - Geeboi_Mehdi - 08.08.2012

But Wait I Got This Error
-------------------------
C:\Users\Daoud\Desktop\las venturas Gang Wars\gamemodes\LVGW.pwn(12) : warning 217: loose indentation
C:\Users\Daoud\Desktop\las venturas Gang Wars\gamemodes\LVGW.pwn(103) : error 029: invalid expression, assumed zero
C:\Users\Daoud\Desktop\las venturas Gang Wars\gamemodes\LVGW.pwn(104) : error 017: undefined symbol "Playerid"
C:\Users\Daoud\Desktop\las venturas Gang Wars\gamemodes\LVGW.pwn(105) : warning 217: loose indentation
C:\Users\Daoud\Desktop\las venturas Gang Wars\gamemodes\LVGW.pwn(107) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


Re: When the Player Killes Another Player - Convex - 08.08.2012

you wrote (Playerid); write like this (playerid);