server restarted.
#1

Server got restarted when I kick someone...

PHP код:
CMD:kick(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playeridCOLOR_GREY"{FF0000}Error: {FFFFFF}Wrong command!! {FF0000}Check availables commands from here `{FFFFFF}/cmds{FF0000}`.");
    new 
pName[MAX_PLAYER_NAME],tName[MAX_PLAYER_NAME],targetidstring[128];
    if(!
aDuty[playerid]) return SendClientMessage(playeridCOLOR_GREY"{FF0000}Error: {FFFFFF}You must be ADMIN ON DUTY to kick someone.");
    if(
sscanf(params"us[128]"targetidparams)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /kick [playerid] [reason]");
    if(!
IsPlayerConnected(targetid)) return SendClientMessage(playeridCOLOR_GREY"{FF0000}Error: {FFFFFF}INVAILD PLAYER ID / NAME.");
    if(
PlayerInfo[playerid][pAdmin] < PlayerInfo[targetid][pAdmin]) return SendClientMessage(playeridCOLOR_GREY"{FF0000}Error: {FFFFFF}Player has a higher admin level than you. [CAN'T KICKED]!");
    
GetPlayerName(playerid,pName,sizeof(pName));
    
GetPlayerName(targetid,tName,sizeof(tName));
    
Kick(targetid);
    
format(stringsizeof(string), "{FB00FF}[KICKED]: PLAYER %s(%d) has been KICKED by Admin %s(%d), REASON: %s."tName,targetidpName,playeridparams);
    
SendClientMessageToAll(-1string);
    return 
1;

Reply


Messages In This Thread
server restarted. - by Man43 - 31.07.2018, 13:43
Re: server restarted. - by AndreProgrammer - 31.07.2018, 13:48
Re: server restarted. - by Man43 - 31.07.2018, 13:52
Re: server restarted. - by AndreProgrammer - 31.07.2018, 13:53
Re: server restarted. - by RedRex - 31.07.2018, 14:00
Re: server restarted. - by Man43 - 31.07.2018, 14:03

Forum Jump:


Users browsing this thread: 2 Guest(s)