Need Help plz
#1

I need Help plz when i ban some player or kick or warn 3 time then some time its restart server badly and all players stats Removed How to Fix that plz Help thanks in advance
Reply
#2

The banned/kicked players' stats removed ? Are you saving it under OnPlayerDisconnect ?
Reply
#3

yeah all thing saving well but when i kick or ban or warn 3 time then it restart server and all gone
Other wise all working Fine
Reply
#4

EDIT:Sorry didn't read it correctly.
Reply
#5

every thing work fine but when i kick or ban some one it restart server some time and all player stats gone admin level every thing gone
Код:
CMD:kick(playerid, params[])
{
   	if(Player[playerid][pAdmin] >= 2)
	{
    new id,reason[50];
    new string[128];
    if(sscanf(params, "us[50]", id,reason))return SendClientMessage(playerid, -1, "Usage: /kick [playerid] [Reason]");
    if(IsPlayerConnected(id))
		{
  			if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_KRED, "Invalid Player");
   			if(Player[playerid][pAdmin] < Player[id][pAdmin]) return SendClientMessage(playerid, COLOR_KRED," You cant use this on Higher Admin") ;
			format(string,sizeof(string),"Administrator '%s' has kicked '%s' for [ %s ] ",GetName(playerid),GetName(id),reason);
		 	SendClientMessageToAll(COLOR_KRED,string);
  			SetTimerEx("KickPlayer",200,false,"d", id);
   			return GameTextForPlayer(id,"~r~you Are kick By ~r~Admin",3000,1); // Freeze the player
	    }
		else return  SendClientMessage(playerid, COLOR_KRED, "Player is not connected!");
	}
	else return SendClientMessage(playerid, COLOR_KRED, "You need level 2 admin to use this cmd!");
}
CMD:ban(playerid, params[])
{
   	if(Player[playerid][pAdmin] >= 3)
	{
    new id,reason[50];
    new string[128];
    if(sscanf(params, "us[50]", id,reason))return SendClientMessage(playerid, -1, "Usage: /ban [playerid] [Reason]");
    if(IsPlayerConnected(id))
		{
  			if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_KRED, "Invalid Player");
   			if(Player[playerid][pAdmin] < Player[id][pAdmin]) return SendClientMessage(playerid, COLOR_KRED," You cant use this on Higher Admin") ;
			format(string,sizeof(string),"Administrator '%s' has Banned '%s' for [ %s ]",GetName(playerid),GetName(id),reason);
		 	SendClientMessageToAll(COLOR_KRED,string);
  			SetTimerEx("Banned",200,false,"d", id);
   			return GameTextForPlayer(id,"~r~you Are Banned By ~r~Admin",3000,1); // Freeze the player
	    }
		else return  SendClientMessage(playerid, COLOR_KRED, "Player is not connected!");
	}
	else return SendClientMessage(playerid, COLOR_KRED, "You need level 3 admin to use this cmd!");
}
forward KickPlayer(playerid);
public KickPlayer(playerid)
{
	if(IsPlayerConnected(playerid))
		Kick(playerid);

	return 1;
}
forward Banned(playerid);
public Banned(playerid)
{
	if(IsPlayerConnected(playerid))
		Ban(playerid);

	return 1;
}
Reply
#6

something in the code is making ur server crash. find out what it is,
and about the stat-reset, ur probably not saving it in the right manner
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)