07.07.2015, 23:14
Try this
Maybe i have helped you
Код:
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; }