08.02.2013, 22:03
Hello,
Im currently scripting a grade system, I defined the diffrent grades. You can give the player a grade now, but I need a way to save each grade.
So far I made this;
But, how can I save it all into "eGrade", so I can call all the grades back later into a dialog for example?
Thanks in advance!
Im currently scripting a grade system, I defined the diffrent grades. You can give the player a grade now, but I need a way to save each grade.
So far I made this;
Код:
command(givegrade, playerid, params[]) { if(Player[playerid][AdminLevel] >= 10 || TempAdmin[playerid][tAdminLevel] >= 10) { new id, grade, string[128]; if(sscanf(params, "ud", id, grade)) return SendClientMessage(playerid, GREY, "Usage: /givegrade [player id or name] [grade id]"); { if(!IsPlayerConnected(id)) return SendClientMessage(playerid, GREY, NotConnected); EduInfo[playerid][eGrade] = grade; format(string, sizeof(string), "Administrator %s{FFFFFF} has given you a [%s]{FFFFFF}.", RemoveUnderScore(playerid), GetGrades(playerid)); SendClientMessage(id, WHITE, string); format(string, sizeof(string), "You have given %s{FFFFFF}, $%s{FFFFFF}.", RemoveUnderScore(id), GetGrades(playerid)); SendClientMessage(playerid, WHITE, string); } } else return SendClientMessage(playerid, GREY, AdminOnly); return 1; }
Thanks in advance!