First kill system buged
#6

Quote:
Originally Posted by TwinkiDaBoss
Посмотреть сообщение
Look at this


pawn Код:
new serverKills;
new pKills[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) { //making sure we have a valid killer. ie: player killed a player
        pKills[killerid] += 1; //adding 1 more kill to the killer
        if(serverKills == 0) { //if there were no kills yet
            GivePlayerXP(killerid,25); //giving XP to the killer
           
            new string[128];
            format(string,sizeof(string),"%s first blood!",GetName(killerid));
            SendClientMessageToAll(COLOR_GREEN,string);
        }
        serverKills += 1; //we are adding 1 more server kill to total kills
    }
    return 1;
}
Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Seriously... You're using killerid for the message, then give XP to the player who died...
Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Stop handing out copy-paste code, and undermining direct learning...
I didn't copy everything i just edit me script with this system and i saw whats wrong.
Reply


Messages In This Thread
First kill system buged - by henkas - 18.11.2016, 17:25
Re: First kill system buged - by Sew_Sumi - 18.11.2016, 17:34
Re: First kill system buged - by TwinkiDaBoss - 18.11.2016, 17:35
Re: First kill system buged - by henkas - 18.11.2016, 17:46
Re: First kill system buged - by Sew_Sumi - 18.11.2016, 18:05
Re: First kill system buged - by henkas - 18.11.2016, 18:09
Re: First kill system buged - by Sew_Sumi - 18.11.2016, 18:38

Forum Jump:


Users browsing this thread: 2 Guest(s)