Level FS
#2

Here's something I threw together for you, using PVar.
pawn Код:
OnPlayerConnect(playerid)
{
Level[playerid] = SetTimerEx("LevelTimer", 60000, true, "i", playerid);
printf("Leveltimer for %s has started", whatever format you use for name);
return 1;
}

forward LevelTimer(playerid);
public LevelTimer(playerid)
{
if(GetPVarInt(playerid, "Level") < 60)
{
SetPVarInt(playerid, "Level", GetPVarInt(playerid, "Level") + 1);
}
else if(GetPVarInt(playerid, "Level") == 60)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) +1);
DeletePVar(playerid, "Level");
SendClientMessage(playerid, 0xFFFFFFAA, "You have leveled up for being online an hour!");
}
return ;
}
This is not tested at any means, so feel free to edit whatnot you might think of.

- KayaQue.
Reply


Messages In This Thread
Level FS - by Anzhelov - 11.07.2011, 09:13
Re: Level FS - by Kayaque - 11.07.2011, 11:23

Forum Jump:


Users browsing this thread: 1 Guest(s)