[HELP] Freeze
#1

need help i need someone help me to put to this command when i freeze someone in server and i need to try the freeze same one while he freezed tell mee "This player is already Freezed" i will give all my thank to all!

Код:
dcmd_freeze(playerid,params[])
{
		new
 		Reason[128],
  		pID;
		if(Player[playerid][admin] < 1){
 		return 0;
		}
		if(sscanf(params,"us",pID,Reason)){
 		return SendClientMessage(playerid,COLOR_GREY,"|| Usage: /freeze [playerid] [reason] ||");
		}
		if(!IsPlayerConnected(pID)){
 		return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
		}
		if(pID == playerid){
			return SendClientMessage(playerid,COLOR_RED,"You can`t FREEZE yourself");
		}
		if(Player[playerid][admin] < Player[pID][admin]){
			return SendClientMessage(playerid,COLOR_RED,"You can`t FREEZE a high ranked admin");
		}
		new string[128], string3[128], string4[128], str[128], name[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME];
		GetPlayerName(pID,name,sizeof(name));
		GetPlayerName(playerid, aname, sizeof(aname));
		format(string,sizeof(string),"**(ADMIN FREEZE)** %s(%d) %s",name,pID,Reason);
		format(string3,sizeof(string3),"You Have Been FORZEN By Admin For: %s",Reason);
		format(string4,sizeof(string4),"You Have FREEZE %s(%d) For Reason %s",name, pID, Reason);
		format(str,sizeof(str), "Admin %s(%d) Has FREEZED %s(%d) For Reason: %s",aname,playerid,name,pID,Reason);
		SendClientMessageToAll(gold,string);
		SendClientMessage(pID, f,string3);
		SendClientMessage(playerid, COLOR_GREEN,string4);
		SendAdminMessage(COLOR_YELLOW, str);
		TogglePlayerControllable(pID, 0);
		SaveToFile("Freeze", str);
		return 1;
}
Reply
#2

bump some scripters help!
Reply
#3

you would need to set a variable for the player when you freeze them , unset it when you unfreeze them and check that value when you run the commnad
Reply
#4

can you fix the command and but that think in the command up there
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)