Quote:
Originally Posted by JesterlJoker
and it only meant you didn't read the code
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
CheckPlayerKills(killerid); //but you'll still need codes inside this to make it work. No way around it
return 1;
}
I specified the killerid not the playerid which means I indicated whoever the killer is.
Now if that is called correctly and I am assuming that you have set you players enums to a kills
ie.
PHP код:
enum pInfo
{
ID,
Name[MAX_PLAYER_NAME],
Kills,
Deaths,
}
new PlayerData[MAX_PLAYERS][pInfo]
now you do this on checkplayerkills
PHP код:
CheckPlayerKills(playerid)
{
PlayerData[playerid][Kills]+=1;
if(PlayerData[playerid][Kills] == 50)
{
SCM(playerid, COLOR_RED, "Oho shit. Holla there n*gg*. You did some tight shit and got fifty heads.");
SCM(playerid, COLOR_RED, "You oughta have some kind of reward. Here foo take this.")
SCM(playerid, COLOR_RED, "You have ranked up.");
//add some theatrics and some shit and your good.
PlayerData[playerid][rank] += 1; // or rank++
}
return 1;
}
|
I read it but i ignored cause
You said this
Код:
if(PlayerData[playerid][Kills] == 50)
And i need every 50 kills it rank up