Damage and exp
#1

so I want to get damage did on player on playertakdamage and to give killerid amount of exp how many damage points he did, on player. help?
Reply
#2

Uh... W-what?..
Please make this possible to read, then people will help you.
Reply
#3

Quote:
Originally Posted by Excelize
Посмотреть сообщение
Uh... W-what?..
Please make this possible to read, then people will help you.
I was tired while writing that. So what I want is : When killerid damage other player, it qill give him ( to killerid ) expirience.But how many damage he do on player, thats amount of expirience that he will be given. If you still do not understand me... If I damage you im game for 46 DMG points, then I will get same amount of expirience needed for level.
Reply
#4

If you are using 0.3z:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID && issuerid != playerid)
    {
        PlayerInfo[issuerid][Experience] += amount; //This is an example, you may have something other than PlayerInfo[issuerid][Experience] to define your experience level.
        //NOTE: The person HITTING the player is 'issuerid', not 'playerid'.
    }
    return 1;
}
Versions earlier than 0.3z:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID && issuerid != playerid)
    {
        PlayerInfo[issuerid][Experience] += amount; //This is an example, you may have something other than PlayerInfo[issuerid][Experience] to define your experience level.
        //NOTE: The person HITTING the player is 'issuerid', not 'playerid'.
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
If you are using 0.3z:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID && issuerid != playerid)
    {
        PlayerInfo[issuerid][Experience] += amount; //This is an example, you may have something other than PlayerInfo[issuerid][Experience] to define your experience level.
        //NOTE: The person HITTING the player is 'issuerid', not 'playerid'.
    }
    return 1;
}
Versions earlier than 0.3z:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID && issuerid != playerid)
    {
        PlayerInfo[issuerid][Experience] += amount; //This is an example, you may have something other than PlayerInfo[issuerid][Experience] to define your experience level.
        //NOTE: The person HITTING the player is 'issuerid', not 'playerid'.
    }
    return 1;
}
+reputation Thank you so much!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)