06.06.2013, 18:46
Код:
CMD:setvw(playerid, params[]) { new playerb, vw, string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pHelper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(sscanf(params, "ui", playerb, vw)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /setvw [playerid] [VW]"); if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id."); SetPlayerVirtualWorld(playerb, vw); format(string, sizeof(string), " You have set %s's VW %d.", RPN(playerb), vw); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), " %s has set your VW %d.", RPN(playerid), vw); SendClientMessage(playerb, COLOR_WHITE, string); return 1; }