11.03.2018, 11:03
I'm making a simple gamemode just to test my abilities and stuff
I'm trying to make kills/deaths (without saving/storing them)
So what I've done is this:
OnPlayerDeath
and on stats command
It doesn't change on /stats command when I die.
I'm trying to make kills/deaths (without saving/storing them)
So what I've done is this:
PHP Code:
new gKills[MAX_PLAYERS];
new gDeaths[MAX_PLAYERS];
PHP Code:
gKills[killerid] ++;
gDeaths[playerid] ++;
PHP Code:
CMD:stats(playerid, params[])
{
new
id,
PlayerName[MAX_PLAYER_NAME],
String[256];
if(sscanf(params, "s[64]", id)) id = playerid;
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(String, sizeof(String), "Player Name: %s | ID: %d | Kills: %d | Deaths: %d", PlayerName, playerid, gKills[id], gDeaths[id]);
SendClientMessage(playerid, -1, String);
return true;
}