Level FS
#1

I've searched here in the forums, but couldn't find anything. Can anyone help me? I'm trying to find Level System for RP servers. For example hours playing = your score or something like that.
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)