14.04.2011, 06:03
i tried to make my own Include because i wanted to make a FS with something there is in my GM(levels)
so i did this:
^^this is in my include... what's wrong with it? when i did:
it didn't work! it always did what i wrote in the "else". plz help! (it suppose to check if the player is level 1 or more
so i did this:
Код:
stock PlayerLevel(playerid, level) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); new file[256], tmp; format(file, 256, "MyGameMode/Users/%s.ini", udb_encode(name)); tmp = dini_Int(file, "Level"); if((IsPlayerConnected(playerid)) && tmp >= level) return true; else return false; }
Код:
if(PlayerLevel(playerid, 1)) { ... ... ... } else { ... }