19.04.2010, 16:39
pawn Код:
if(killerid == playerid)
{
if(playerDB[killerid][EXP] >= .....???? // <<<<< Wut to write here<<<???
{
SendClientMessage(killerid,COLOR_WHITE,"[INFO] New level biatch!.");
playerDB[killerid][Level] ++;
PlayerPlaySound(killerid,1057,0.0,0.0,0.0);
}
}
Okay i got the levels defined like: #define LEVEL1 5000
the 5000 is the experience which is needed to be earn, i got 30levels and my question is how do i check if the player has passed the experience so he would recieve a new level? checking every level exp would take some time and some more data, i know theres an easier way but can't figure it out, i tried to search didn't result in my problem, anyone knows?? cmoon..
edit: or if anyone knows an easier way to make this without defines , waiting for all replies.
EDIt 2: Found a way but get an error:
Код:
playerDB[playerid][PatirtisLeft] = LevelExp[playerDB[playerid][Lygis]]) - playerDB[playerid][Patirtis];
Код:
new LevelExp[30]
Код:
E:\Games Setup\Gta san andreas server\Install\samp02Xserver.win32\gamemodes\FreeRoam.pwn(9115) : error 001: expected token: ";", but found ")" E:\Games Setup\Gta san andreas server\Install\samp02Xserver.win32\gamemodes\FreeRoam.pwn(9115) : error 029: invalid expression, assumed zero E:\Games Setup\Gta san andreas server\Install\samp02Xserver.win32\gamemodes\FreeRoam.pwn(9115) : warning 215: expression has no effect