Is there a way to do that ?
#1

Can i do that:When player is in range if point when die to lose money and when kill to get money or something like that:
PHP код:
{
if(
dmarena[playerid] == 1)
GivePlayerMoney(killerid1000);
GameTextForPlayer(playerid"Wasted."50002);
GivePlayerMoney(playerid, -500);

Reply
#2

Is it about DM? You could check if he's in DM instead of range.
pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
    if( IsPlayerInRangeOfPoint( playerid, range, X, Y, Z ) ) // Edit the range, X, Y and Z.
    {
        // If he's in range, get $500 from the player who died
        GivePlayerMoney( playerid, -500 );
    }
    if( killerid != INVALID_PLAYER_ID )
    {
        GivePlayerMoney( killerid, 1000 );
        GameTextForPlayer( playerid, "Wasted.", 5000, 2 );
    }
    return 1;
}
Reply
#3

Its about DM ARENA, when player is in DM arena, i want when die to lose money and when kill to get money, i am gonna test your script, but is it another way to to that ?
Reply
#4

You told us about range of point. I believe it's better to check if he's inside DM and then take the money from the playerid. It's better way.

That would be better:
pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
    if( dmarena[ playerid ] == 1 ) GivePlayerMoney( playerid, -500 );
    if( killerid != INVALID_PLAYER_ID && dmarena[ killerid ] == 1 )
    {
        GivePlayerMoney( killerid, 1000 );
        GameTextForPlayer( playerid, "Wasted.", 5000, 2 );
    }
    return 1;
}
Don't forget to reset the variable when a player leaves the DM and on player connect too.
Reply
#5

Thanks !Dont worry, i did it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)