28.02.2009, 19:20
Ok, ye, i understand you, I have got a similar register system on my Call of duty server and basicly this is how you make it so u rank up without /buylevel:
taken off the main code of /buylevel and replace somewhere udnernath 'onplayerupdate'
so, i probaly missed alot out, so just use that kind of thinking..
taken off the main code of /buylevel and replace somewhere udnernath 'onplayerupdate'
Код:
format(string, sizeof(string), "~g~LEVEL UP~n~~w~You Are Now Level %d", nxtlevel); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); PlayerPlayMusic(playerid); //GivePlayerMoney(playerid, (-costlevel)); PlayerInfo[playerid][pLevel]++; if(PlayerInfo[playerid][pDonateRank] > 0) { PlayerInfo[playerid][pExp] -= expamount; new total = PlayerInfo[playerid][pExp]; if(total > 0) { PlayerInfo[playerid][pExp] = total; } else { PlayerInfo[playerid][pExp] = 0; } } else { PlayerInfo[playerid][pExp] = 0; }
Код:
new nxtlevel = PlayerInfo[playerid][pLevel]+1; new costlevel = nxtlevel*levelcost;//10k for testing purposes new expamount = nxtlevel*levelexp;