I have original soccerjam mod and I want to change some features. I want when player disconnects, player's own deaths,kills,records are not removed
for only current map.
Look codes below,
PHP Code:
public client_disconnect(id) {
if(is_kickball) {
new x
for(x = 1; x<=RECORDS; x++)
MadeRecord[id][x] = 0
remove_task(id)
if(ballholder == id ) {
ballholder = 0
clearBall()
}
if(ballowner == id) {
ballowner = 0
}
GoalyPoints[id] = 0
PlayerKills[id] = 0
PlayerDeaths[id] = 0
is_dead[id] = false
seconds[id] = 0
g_sprint[id] = 0
PressedAction[id] = 0
has_knife[id] = false;
g_Experience[id] = 0
for(x=1; x<=UPGRADES; x++)
PlayerUpgrades[id][x] = 0
}
}
When I removed PlayerKills = 0 , PlayerDeaths[id] = 0 and MadeRecord[id][x] = 0
when player 1 reconnected, the player 1's data is loaded but
somebody else is connect who has not data, still player 1's own data is loaded.
My request:
I want when players close the game(quit) and reconnected the players data are loaded for only current map. The data should be save by player's steamid. I tried using tries but I am noob . Can you change this sma to my requests? You can using tries thanks.
PHP Code:
new x
for(x=1; x<=maxplayers; x++) {
if(is_user_connected(x))
{
Event_Record(x, GOALY, GoalyPoints[x], 0)
new kills = get_user_frags(x)
new deaths = cs_get_user_deaths(x)
setScoreInfo(x)
if( deaths > 0)
PlayerDeaths[x] = deaths
if( kills > 0)
PlayerKills[x] = kills
}
}