How do i make a /Freeze and /unfreeze using Zcmd
#1

well im having a problem with /freeze and /unfreeze Because with my cmd when i do /freeze, It doesnt just freeze the Person it freezes the hole server so Lol Can anyone give me a code or Pastebin Link for it?
Please and Thanks, S.Killa

Reply
#2

Код:
#define BAD_ID_MSG "Invalid username/ID!"

cmd(freeze, playerid, params[])
{
	new giveplayerid;
	if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /freeze [playerid/name]");
	if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GRAD1, BAD_ID_MSG);
	new string[128];
	TogglePlayerControllable(giveplayerid, 0);
	format(string, sizeof(string), "[AdmCmd]: %s froze %s.", RPN(playerid), RPN(giveplayerid));
	ABroadCast(COLOR_YELLOW, string, 1);
	return 1;
}

cmd(unfreeze, playerid, params[])
{
	new giveplayerid;
	if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /unfreeze [playerid/name]");
	if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GRAD1, BAD_ID_MSG);
	new string[128];
	TogglePlayerControllable(giveplayerid, 1);
	format(string, sizeof(string), "[AdmCmd]: %s unfroze %s.", RPN(playerid), RPN(giveplayerid));
	ABroadCast(COLOR_YELLOW, string, 1);
	return 1;
}
Reply
#3

Please post your /freeze command or pm me.
YOur problem is clear and easy to solve.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)