HELP RESTART SERVER
#4

i don't use crashdetect.
pawn Код:
CMD:spec(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, "You need to login first.");
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
            new id,giveplayer[25],string[100];
            if(sscanf(params, "u", id)) return SCM(playerid,COLOR_WHITE,"Syntax:{FFFFFF} /spec <Name/Playerid>");
            {
                if(IsPlayerConnected(id))
                {
                    if(id != INVALID_PLAYER_ID)
                    {
                        Spectate[playerid] = id;
                        new Float:health;
                        new playersip[180];
                        GetPlayerHealthEx(Spectate[playerid], health);
                        GetPlayerIp(Spectate[playerid],playersip,sizeof(playersip));
                        GetPlayerName(Spectate[playerid], giveplayer, sizeof(giveplayer));
                        format(string, sizeof(string), "- Player Info: Name: %s | Heal: %.2f | Location: %s | IP: %s | Level: %d | Wanted: %d -",giveplayer,health,GetPlayerZone(playerid),playersip,PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pWantedLevel]);
                        SendClientMessage(playerid, COLOR_IN2, string);
                        TogglePlayerSpectating(playerid, 1);
                        if(IsPlayerInAnyVehicle(Spectate[playerid]))
                        {
                            new carid = GetPlayerVehicleID(Spectate[playerid]);
                            PlayerSpectateVehicle(playerid, carid);
                        }
                        else
                        {
                            PlayerSpectatePlayer(playerid, Spectate[playerid]);
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
                }
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
            return 1;
        }
    }
    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: 1 Guest(s)