I have stuck on this wried error and I cant fix this...
I wanna save climber timer when he was disconnect
and when the climber came back server,
timer will set to when he was left the server.
here is the pic of error
here is declaration of timersave
PHP Code:
new const NULLSTR[ ] = ""
//Temp save vars ; took from Climb
new savepos = 0, steamid[32][32], Float:originssave[32][48], timersave[32][15], Float:originstemp[33][48]
and here is the code between 830-835..
PHP Code:
timersave[savepos] = g_playertime[id] //save timer array
//clear data for new client in that slot
for( new i = 0; i < 48; i++ ) g_player_specposition[id][i] = 0.0
for( new i = 0; i < 14; i++ ) g_playertime[id][i] = 0
}
if that will be so smooth.. here is my whole save pos and timer code down here
what I trying to transform from Climb to Kz-Arg
PHP Code:
public client_disconnect(id)
{
if( g_playerisvip[id] )
fm_remove_model_ents(id)
remove_task(id+TASK_ID_MINISECOND)
remove_task(id+TASK_ID_NIGHTVISION)
remove_task(id+TASK_ID_WELCOMMSG)
// start save pos and timer !
if( get_pcvar_num(cvar_enable) )
{
savepos++
if( savepos == 31 ) savepos = 0
new saveid[32]
get_user_authid( id, saveid, 32 )
//erase previous save if exists
for( new i=0; i<32; i++ )
if( equal( saveid, steamid[i] ) ) steamid[i] = NULLSTR
if( g_playertime[id] && g_playerstart[id] ) g_playerpaused[id] = 1 //Pause if running
pev(id, pev_origin, originstemp[id])
steamid[savepos] = saveid //save steamid to position reference
originssave[savepos] = originstemp[id] //save origins
timersave[savepos] = g_playertime[id] //save timer array
//clear data for new client in that slot
for( new i = 0; i < 48; i++ ) g_player_specposition[id][i] = 0.0
for( new i = 0; i < 14; i++ ) g_playertime[id][i] = 0
}
}
when player putinserver
PHP Code:
public client_putinserver(id)
{
if( get_pcvar_num(kz_welcomemsg) == 1 )
set_task(1.0, "welcomemsg", id+TASK_ID_WELCOMMSG)
//search steamid to position reference for match
new searchid[32]
get_user_authid( id, searchid, 31 )
for(new i = 0; i < 32; i++ )
if( equal( searchid, steamid[i] ) )
{//load origins & timer array if match found
set_pev(id, pev_origin, originssave[id])
timer[id] = timersave[i]
}
//blah blah down here is original kz-arg code..
}
thanks is advance and sorry my bad english..