Level system ! (+REP for help) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Level system ! (+REP for help) (
/showthread.php?tid=512573)
Level system ! (+REP for help) -
Reebok1 - 11.05.2014
Hello all !
I want to make a Level System for my new gamemode but i do not know where to start
And i want to be : 1hour = 1lvl = 1score
I mean at 1 hour played to be a 1Level (TAB=Score)
And my server is with basic enum pInfo and Login/Register system
If you help me , + REP you
Re: Level system ! (+REP for help) -
Beckett - 11.05.2014
Show your enum.
Re: Level system ! (+REP for help) -
Reebok1 - 11.05.2014
Код:
enum pInfo
{
pPass,
pCash,
pAdmin,
pSex,
pAge,
pSkin,
pTeam,
pAccent,
pTaxiLic,
Leader,
Member,
Rank
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Re: Level system ! (+REP for help) -
rickisme - 11.05.2014
require y_timers, foreach
Add pCSecs, pLevel to your enum
pawn Код:
// UPDATE Player connect time per secs
task UpdatePerSecs[1000]()
{
foreach(new i : Player)
{
PlayerInfo[i][pCSecs]++;
// 1 hours
if(PlayerInfo[i][pCSecs] >= 3600)
{
PlayerInfo[i][pCSecs] -= 3600;
PlayerInfo[i][pLevel]++;
SetPlayerScore(playerid, PlayerInfo[i][pLevel]);
}
}
}
Re: Level system ! (+REP for help) -
Reebok1 - 11.05.2014
I dont undersand put the pLevel and pCSecs on INI_ to save on accounts ? .ini
Re: Level system ! (+REP for help) -
Reebok1 - 11.05.2014
And i want a SendClientMessage on fix hours " Its fix hour and you gained a 1level you have a Level
Re: Level system ! (+REP for help) -
Reebok1 - 11.05.2014
And where put this "task"?
Re: Level system ! (+REP for help) -
rickisme - 11.05.2014
you can save player level, connecttime when they disconnect ( use dini, y_ini or whatever you want )
if you want send mess when they level up just add SendClientMessage after
pawn Код:
SetPlayerScore(playerid, PlayerInfo[i][pLevel]);
about "task" read more here :
https://sampforum.blast.hk/showthread.php?tid=182948
Re: Level system ! (+REP for help) -
Reebok1 - 11.05.2014
Код:
D:\Old City RolePlay v0.1\pawno\include\YSI\y_iterate.inc(179) : fatal error 111: user error: "Old foreach.inc files are no longer compatible with YSI."
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: Level system ! (+REP for help) -
rickisme - 11.05.2014
http://forum.sa-mp.com/showpost.php?...58&postcount=9