Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ExpTimer()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (gPlayerLogged[i] != 0)
- {
- if(PlayerInfo[i][pLevel] >= 0)
- {
- new nxtlevel = PlayerInfo[i][pLevel]+1;
- new expamount = nxtlevel*levelexp;
- new string[128];
- if (PlayerInfo[i][pExp] < expamount)
- {
- return 1;
- }
- else
- {
- format(string, sizeof(string), "~r~POKACIVTE LEVEL !");
- GameTextForPlayer(i, string, 5000, 4);
- PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "Pocekajte...",PlayerInfo[i][pExp],expamount);
- TextDrawSetString(lvlexp[i], string);
- PlayerInfo[i][pLevel]++;
- PlayerInfo[i][pExp] = 0;
- if(PlayerInfo[i][pDonateRank] > 0)
- {
- PlayerInfo[i][pExp] -= expamount;
- new total = PlayerInfo[i][pExp];
- if(total > 0)
- {
- PlayerInfo[i][pExp] = total;
- }
- else
- {
- PlayerInfo[i][pExp] = 0;
- }
- }
- else
- {
- PlayerInfo[i][pExp] = 0;
- }
- }
- }
- return 1;
- }
- else
- {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment