07.07.2015, 22:41
I need that command that admins can use.Example USE: /Freeze <Player> <duration> <reason>
CMD:freeze(playerid,params[]) { if(!IsPlayerAdmin(playerid)) return GameTextForPlayer(playerid, "~r~error~w~:only admins can use this command!",3000,3); else { new pname[MAX_PLAYER_NAME], string[128], reason[50], giveplayerid; GetPlayerName(playerid, pname,sizeof(pname)); if(sscanf(params,"rs[50]",giveplayerid,reason)) return GameTextForPlayer(playerid, "~r~error~w~:/freeze (playerid) (reason)",2000,3); else if(!IsPlayerConnected(giveplayerid)||giveplayerid == INVALID_PLAYER_ID) return GameTextForPlayer(playerid, "~r~error~w~:This player isn't connected!",3000,3); else { format(string,sizeof(string),"ADMIN FREEZE: %s has been freezed by an administrator(Reason: %s)",pname,reason); SendClientMessageToAll(COLOR_PINK, string); TogglePlayerControllable(giveplayerid, 0); GameTextForPlayer(giveplayerid,"~r~FROZEN",3000,3); } } return 1; }