HELP RESTART SERVER
#1

Hello, i have problem when any admin is make /spec , and he /slap players, server is restart auto



Code:
pawn Код:
CMD:slap(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, "You need to login first.");
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
        {
            new string[64],giveplayer[25],sendername[25],id;
            if(sscanf(params, "u",id)) return SCM(playerid,0xCECECEFF, "Syntax:{FFFFFF} /slap <Name/Playerid>");
            new Float:shealth;
            new Float:slx, Float:sly, Float:slz;
            if(IsPlayerConnected(id))
            {
                GetPlayerName(id, giveplayer, sizeof(giveplayer));
                GetPlayerName(playerid, sendername, sizeof(sendername));
                GetPlayerHealthEx(id, shealth);
                SetPlayerHealthEx(id, shealth-5);
                GetPlayerPos(id, slx, sly, slz);
                SetPlayerPos(id, slx, sly, slz+5);
                format(string, 256, "{FF0000}AdmInfo: {FFFFFF}Admin/Helper %s slap %s.", sendername,giveplayer);
                ABroadCast(COLOR_WHITE,string,1);
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
            }
        }
        else return SendClientMessage(playerid, COLOR_WHITE,"{5CAD5C}Error: Your admin/helper");
    }
    return 1;
}
Reply


Messages In This Thread
HELP RESTART SERVER - by KingPersona - 10.05.2015, 12:31
AW: HELP RESTART SERVER - by Mencent - 10.05.2015, 12:33
Re: HELP RESTART SERVER - by StR_MaRy - 10.05.2015, 12:34
Re: HELP RESTART SERVER - by KingPersona - 10.05.2015, 12:39
Re: HELP RESTART SERVER - by Yashas - 10.05.2015, 12:44
Re: HELP RESTART SERVER - by Konstantinos - 10.05.2015, 12:44
Re: HELP RESTART SERVER - by KingPersona - 10.05.2015, 13:06
Re: HELP RESTART SERVER - by Konstantinos - 10.05.2015, 13:18
Re: HELP RESTART SERVER - by SoFahim - 10.05.2015, 14:31
Re: HELP RESTART SERVER - by JaydenJason - 10.05.2015, 15:58

Forum Jump:


Users browsing this thread: 2 Guest(s)