Making a staff position help
#1

Greetings,
I have made a "Moderator" Staff position but i'm having an issue, I'm able to issue it and when you relog its still there aswell but when i restart the server it gets removed

i have done the following
Defined
Код HTML:
enum pInfo
{
	pModerator,
};
Making Moderator
Код HTML:
CMD:makemoderator(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 99999) {
	    SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
	    return 1;
	}

	new string[128], giveplayerid;
	if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /makemoderator[playerid]");

	if(IsPlayerConnected(giveplayerid)) {
	    if(PlayerInfo[giveplayerid][pModerator] != 1) {
	        PlayerInfo[giveplayerid][pModerator] = 1;
	        format(string, sizeof(string), "You have made %s a Moderator.", GetPlayerNameEx(giveplayerid));
	        SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
	        format(string, sizeof(string), "You have been made a Moderator by %s.", GetPlayerNameEx(playerid));
	        SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
		} else {
		    PlayerInfo[giveplayerid][ppModerator] = 0;
	        format(string, sizeof(string), "You have revoked %s's Moderator", GetPlayerNameEx(giveplayerid));
	        SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
	        format(string, sizeof(string), "You have had your Moderator Status revoked by %s.",                                         GetPlayerNameEx(playerid));
	        SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
		}
	}
	return 1;
}
OnPlayerRegister [File]
Код HTML:
public OnPlayerRegister(playerid, password[])
{
	if(IsPlayerConnected(playerid))
	{
			new string3[32];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "users/%s.ini", playername3);
			new File: hFile = fopen(string3, io_write);
			if (hFile)
			{
				strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
				new var[156];
				format(var, 32, "Moderator=%d\n",PlayerInfo[playerid][pModerator]);fwrite(hFile, var);
			    format(var, 32, "Moderator=%d\n",PlayerInfo[playerid][pModerator]);fwrite(hFile, var);
				format(var, 32, "Moderator=%d\n",PlayerInfo[MAX_PLAYERS][pModerator]);fwrite(hFile, var);

What is the problem, and if there is a link for a tutorials of how to make as staff position or a group please link me
Reply


Messages In This Thread
Making a staff position help - by Oldyman - 10.06.2015, 18:55
Re: Making a staff position help - by PepsiCola23 - 10.06.2015, 19:02
Re: Making a staff position help - by Oldyman - 10.06.2015, 19:07
Re: Making a staff position help - by Banana_Ghost - 11.06.2015, 02:12
Re: Making a staff position help - by Huba - 11.06.2015, 11:30
Re: Making a staff position help - by Oldyman - 11.06.2015, 15:46
Re: Making a staff position help - by Konstantinos - 11.06.2015, 16:02

Forum Jump:


Users browsing this thread: 1 Guest(s)