Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GiveExp(pid, val)
- {
- if (pid == null)
- {
- //botu ne daem exp
- }
- else
- {
- local realtime = date();
- local hours = realtime.hour;
- if(hours >= 10 && hours <= 23)
- {
- if(val+getPlayerExp(pid) >= getPlayerNextLvlExp(pid))
- {
- setPlayerLevel(pid, getPlayerLevel(pid)+1);
- setPlayerLp(pid, getPlayerLp(pid)+1);
- setPlayerMaxHealth(pid, getPlayerMaxHealth(pid)+5);
- callClientFunc(pid,"showNotification", " LVL UP ");
- setPlayerNextLvlExp(pid, getPlayerNextLvlExp(pid) + (getPlayerLevel(pid) + 1) * 500)
- GiveExp(pid, val);
- }
- else
- {
- setPlayerExp(pid, val+getPlayerExp(pid))
- callClientFunc(pid,"showNotification", "Опыт +"+val);
- }
- }
- else
- {
- callClientFunc(pid,"showNotification", "Вы не можете получать опыт с 0:00 до 10:00 по МСК");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement