Command which crashes the server..
#3

pawn Код:
CMD:duel(playerid, params[])
{
    new id, id2, weapon;
    if(PlayerInfo[playerid][pAdmin] >=3)
    {
        if(sscanf(params, "uii", id, id2, weapon)) SendClientMessage(playerid, COLOR_GREY, "** [Usage]: /duel [playerid/name] [playerid/name] [Weapon]");
        if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_LIGHTRED, "** [Error]: Player One not found");
        if(id2 == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_LIGHTRED, "** [Error]: Player Two not found");
        SetPlayerPos(playerid, 1374.0948,5.5511,1008.1563);
        SetPlayerPos(id, 1413.1495,-15.9198,1000.9246);
        SetPlayerPos(id2, 1367.6084,-17.7317,1000.9219);
        SetPlayerHealth(id, 100);
        SetPlayerHealth(id2, 100);
        SetPlayerArmour(id, 100);
        SetPlayerArmour(id2, 100);
        ResetPlayerWeapons(id);
        ResetPlayerWeapons(id2);
        GivePlayerValidAdminWeapon(id, weapon);
        GivePlayerValidAdminWeapon(id2, weapon);
        GameTextForPlayer(id, "~r~DUEL ON", 2000, 4);
        GameTextForPlayer(id2, "~r~DUEL ON", 2000, 4);
        SetPlayerInterior(id, 1);
        SetPlayerInterior(id2, 1);
        SetPlayerInterior(playerid, 1);
        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerVirtualWorld(id, 0);
        SetPlayerVirtualWorld(id2, 0);
    }
    else
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "** [Error]: You are NOT a Level 3+ admin");
        return 1;
    }
}
Try this, and post server logs as the above poster said.
Reply


Messages In This Thread
Command which crashes the server.. - by davidstyle1125 - 11.12.2014, 20:38
Re: Command which crashes the server.. - by CoaPsyFactor - 11.12.2014, 21:36
Re: Command which crashes the server.. - by DaniceMcHarley - 11.12.2014, 21:41
Re: Command which crashes the server.. - by davidstyle1125 - 12.12.2014, 11:59

Forum Jump:


Users browsing this thread: 2 Guest(s)