29.07.2017, 15:08
Can someone tell me how to save/load a text parameter?
I only know how to do it with numbers used for ranks and stuff using player data and MAX PLAYER created variables
I want to know how to save the parameters to make a tag system that will be shown in the command /admins.
I already made the command and all I need that to know how to do that.
And here's my /asettag command,
I only know how to do it with numbers used for ranks and stuff using player data and MAX PLAYER created variables
I want to know how to save the parameters to make a tag system that will be shown in the command /admins.
I already made the command and all I need that to know how to do that.
Код:
CMD:admins(playerid, params[]) { new count = 0, str[200]; SendClientMessage(playerid, COLOR_WHITE,"- List of Online Admins -"); foreach(Player,i) { if(Player[i][pLevel] >=1) { if(IsPlayerConnected(i)) { if(count != 0) { format(str,sizeof(str),"[%d]%s - Level %d (%s) %s", i, PlayerName(i), Player[i][pLevel], Player[i][aTag], GetPlayerOnDuty(i)); SendClientMessage(playerid, OR, str); } } } } if(count == 0) { SendClientMessage(playerid, OR,"No Admins are currently online!"); } return 1; }
Код:
CMD:asettag(playerid, params[]) { new str[128]; if(Player[playerid][pLevel]<=5) return SendClientMessage(playerid, OR, "ERROR: You are not authorized to use this command"); if(sscanf(params,"us",Player,Player[playerid][aTag])) return SendClientMessage(playerid, COLOR_GREY, "Usage: /asettag [ID] [tag]"); format(Player[playerid][aTag], 50, "%s",Player[playerid][aTag]); DOF2_SetString(AFile(pPlayer),"Tag",Player[playerid][aTag]); format(str, SOS, "Your admin tag has been set by administrator %s", PlayerName(playerid)); SendClientMessageEx(playerid, COLOR_GREEN, str); format(str, SOS, "Admin: %s has used the command ASETTAG", PlayerName(playerid)); SendAdminMessage(OR, str); return DOF2_SaveFile(); }