[HELP]Command request
#2

you will need A Global Player variable to stoer the players time in.
then load & save it every time the player joins becouse you cant just set the timer again just OnPlayerConnect

i cannot show u and exmaple now :X dont have alot of time.
Example
pawn Код:
new PTimer[MAX_PLAYERS];//At the top so its global

//then SetTimerEx on 'OnPlayerConnect'
public OnPlayerConnect(playerid)
{
//Dont know what saving System you use so just load the ''PTimer''
SetTimerEx("AfterTime", PTimer[playerid], false, "i", playerid);

forward AfterTime(playerid);
public AfterTime(playerid)
{
//pLevel=+1;
//Change to your pLevel variable
return 1;
}
}

Then 'OnPlayerDisconnect' make sure to save the time.
public OnPlayerDisconnect(playerid)
{
//This is saved with 'Y_INI'
new name[MAX_PLAYER_NAME], file[128];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"/mRegistration/Settings/%s.txt",name);
INI_WriteInt(file,"ServerTime",PTimer[playerid]);
return 1;
}
Reply


Messages In This Thread
[HELP]Command request - by 3RoR - 18.03.2012, 20:27
Re: [HELP]Command request - by park4bmx - 18.03.2012, 20:56
Re: [HELP]Command request - by 3RoR - 18.03.2012, 21:01
Re: [HELP]Command request - by 3RoR - 19.03.2012, 06:44
Re: [HELP]Command request - by ReneG - 19.03.2012, 06:50
Re: [HELP]Command request - by 3RoR - 19.03.2012, 08:46
Re: [HELP]Command request - by RoleplayEditor - 19.03.2012, 09:06
Re: [HELP]Command request - by 3RoR - 19.03.2012, 09:40

Forum Jump:


Users browsing this thread: 1 Guest(s)