When the Player Killes Another Player
#1

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
Reply
#2

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!
Reply
#3

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

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.
Reply
#5

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

    return 1;
}
Reply
#6

Thanx Man Rep 1 for You
Reply
#7

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.
Reply
#8

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


Forum Jump:


Users browsing this thread: 1 Guest(s)