[HELP]Command request
#1

How to create a timer(min)for level ?
Y set a timer when a player play 250min on server then the server give's him a Level up 1+ ETC FOR ALL LEVELS(350,450,550ETCCCCCC)
Ex.
You have played 250minutes on server and you have a Level + (2)
You have played 350minutes on server and you have a Level + (3)
You have played 450minutes on server and you have a Level + (4)
Reply
#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
#3

Can you help me ?
Y will give you a server 50Slots plz :S

EDIT:y have a hosting..

EDIT AGAIN:y found a script for level can you fix me and give me the script fixed,

Quote:

pLevelSistem
forward Level();
SetTimer("Level",60000,true);
Public Level()
{
new i;
for(i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))
PlayerInfo[pLevelSistem] ++;
if(PlayerInfo [pLevelSistem] == 1)
{
PlayerInfo[pExp] ++;
PlayerInfo[pLevelSistem] = 0;
ShowClientMesssage(i, COLOR_LIGHTBLUE, "Earned 1Exp for playing on server");
}
}
}
OnPlayerRegister
format(var, 128, "Vreme=%d\n",PlayerInfo[playerid][pLevelSistem]);fwrite(hFile, var);

OnPlayerUpdate
format(var, 128, "Vreme=%d\n",PlayerInfo[playerid][pLevelSistem]);fwrite(hFile, var);

OnPlayerLogin
if( strcmp( key , "Vreme" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevelSistem] = strval( val ); }

Reply
#4

Can Help someone ?
Reply
#5

This is the wrong thread if you're looking for scripters.
Reply
#6

noo y just wanna help :@ :S
Reply
#7

Who is Y Lol
Reply
#8

fuck :@. lock...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)