SA-MP Forums Archive
[HELP] Freeze - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Freeze (/showthread.php?tid=219739)



[HELP] Freeze - [MKD]Max - 02.02.2011

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;
}



Re: [HELP] Freeze - [MKD]Max - 02.02.2011

bump some scripters help!


Re: [HELP] Freeze - (SF)Noobanatior - 02.02.2011

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


Re: [HELP] Freeze - [MKD]Max - 02.02.2011

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