#6

Code:
CMD:skill(playerid, params[]) 
{
	new DetectiveLevel = PlayerInfo[playerid][pDetSkill], NextLevelDET[48]; 
    if(DetectiveLevel >= 0 && DetectiveLevel <= 50) { format(CurrentLevelDET, sizeof(CurrentLevelDET), "1"); format(NextLevelDET, sizeof(NextLevelDET), "You need to find %d more people to level up.",51 - DetectiveLevel);} 
    else if(DetectiveLevel >= 51 && DetectiveLevel <= 100) { format(CurrentLevelDET, sizeof(CurrentLevelDET), "2"); format(NextLevelDET, sizeof(NextLevelDET), "You need to find %d more people to level up.", 101 - DetectiveLevel); } 
    else if(DetectiveLevel >= 101 && DetectiveLevel <= 200) { format(CurrentLevelDET, sizeof(CurrentLevelDET), "3"); format(NextLevelDET, sizeof(NextLevelDET), "You need to find %d more people to level up.", 201 - DetectiveLevel); } 
    else if(DetectiveLevel >= 201 && DetectiveLevel <= 400) { format(CurrentLevelDET, sizeof(CurrentLevelDET), "4"); format(NextLevelDET, sizeof(NextLevelDET), "You need to find %d more people to level up.", 401 - DetectiveLevel); } 
    else if(DetectiveLevel >= 401) { format(CurrentLevelDET, sizeof(CurrentLevelDET), "5"); } 

    format(DialogInfo, sizeof(DialogInfo), "Detective Level:%d - Find %d more people to level up!\nNEXT ONE!\nAND THE NEXT ONE!\n", CurrentLevelDET, NextLevelDET)
    ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Levels", DialogInfo,"Select", "Cancel");

	return 1;
}
This is how about you would do it, I have done this quickly to show you what they mean. There could be cleaner ways to do this and also I have only given the example for the one you would need to do the rest. Good luck.
Reply


Messages In This Thread
Help - by Bojaa - 28.04.2017, 15:06
Re: Help - by Bojaa - 28.04.2017, 17:37
Re: Help - by Bojaa - 29.04.2017, 19:49
Re: Help - by Astralis - 29.04.2017, 19:52
Re: Help - by Bojaa - 29.04.2017, 19:56
Re: Help - by JessThompson - 29.04.2017, 21:04
Re: Help - by Sew_Sumi - 29.04.2017, 21:41
Re: Help - by Bojaa - 30.04.2017, 09:42
Re: Help - by Toroi - 30.04.2017, 14:49
Re: Help - by Bojaa - 30.04.2017, 16:05

Forum Jump:


Users browsing this thread: 2 Guest(s)