11.12.2014, 20:38
Hello, one of the commands we added to the server (/duel) makes the server CRASH..
Do you guys have any idea why? or you can help me to solve it ?
here's the command:
Do you guys have any idea why? or you can help me to solve it ?
here's the command:
Код:
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]"); else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_LIGHTRED, "** [Error]: Player One not found"); else if (id2 == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_LIGHTRED, "** [Error]: Player Two not found"); else { 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); return 1; } return 1; } else { SendClientMessage(playerid, COLOR_LIGHTRED, "** [Error]: You are NOT a Level 3+ admin"); return 1; } }