Score point and money for each kill [HELP]
#1

When you or someone else kill somebody, he gets +1 score and for example: $1000 for each kill, tell me how please and if possible to make without zcmd ycmd just like in "a_samp" for example the onplayercommandtext
Such as:
pawn Код:
if(strcm).....
and then sendclientmessage etc etc
return 1;
if possible to make it like that, but not with zcmd such as:
pawn Код:
CMD:blablablab
etc etc
return 1;
thanks
Reply
#2

You don't even need a command for that.

pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
    if( killerid != INVALID_PLAYER_ID )
    {
        SetPlayerScore( killerid, GetPlayerScore( killerid ) + 1 );
        GivePlayerMoney( killerid, 1000 );
    }
    return 1;
}
Reply
#3

You made me this:
for example:

I killed you, I got +1 score and $1000, not you, right?

And can you make me, i'll give you an example:

I killed you, I got +1 score and $1000, but the guy who got killed by me -1 score and -$1000, how do I make that?
Reply
#4

killerid is the player who killed somebody.
playerid is the player who got killed by someone.

pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
    if( killerid != INVALID_PLAYER_ID )
    {
        SetPlayerScore( killerid, GetPlayerScore( killerid ) + 1 );
        GivePlayerMoney( killerid, 1000 );
    }
    SetPlayerScore( playerid, GetPlayerScore( playerid) - 1 );
    GivePlayerMoney( playerid, -1000 );
    return 1;
}
Reply
#5

thank you, I also changed a bit some parts, thanks again.
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You don't even need a command for that.

pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
    if( killerid != INVALID_PLAYER_ID )
    {
        SetPlayerScore( killerid, GetPlayerScore( killerid ) + 1 );
        GivePlayerMoney( killerid, 1000 );
    }
    return 1;
}
^
yes, the killer will get the +1 score and the $1000.
Reply
#7

Hey, I need a help, how to make when I "not kill" when I hit the player with the weapon and yeah even kill too, I hear this music.
Look at it, please: [ame]http://www.youtube.com/watch?v=SQpUUvd8hGQ[/ame]
You can hear it on 0:05, i'm looking forward for help, thanks.
Reply
#8

Any further help, please?
Reply
#9

Anyone, please
Reply
#10

Try 3401 or 6401
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)