Mute, unmute, freeze, unfreeze, jail, unjail
#1

can someone help me i need to make all of this commands that when i jail someone and try to jail him tell me this player is already in jail and same as mute and freeze


Код:
dcmd_mute(playerid,params[])
{
	new
	    Reason[256],
	    pID;
    if(Player[playerid][admin] < 1){
	 	return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command!");
 		}
	if(sscanf(params,"us",pID,Reason)){
		return SendClientMessage(playerid,COLOR_RED,"|| Usage: /mute [playerid] [reason] ||");
		}
	if(!IsPlayerConnected(pID)) {
	    return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
	    }
	new
	        name[MAX_PLAYER_NAME],
	        string[128], string3[128];
	GetPlayerName(pID,name,sizeof(name));
	format(string,sizeof(string),"**(ADMIN MUTE)** %s(%d) %s",name,pID,Reason);
	format(string3,sizeof(string3),"You Have Been MUTED By Admin For Reason: %s",Reason);
	SendClientMessageToAll(COLOR_RED,string);
	SendClientMessage(pID, COLOR_RED, string3);
	SaveToFile("MuteWarnings",string); Muted[pID] = 1;
  	return 1;
}
Код:
dcmd_unmute(playerid,params[])
{
	new
	    Reason[256],
	    pID,
	    i;
    if(Player[playerid][admin] < 1){
	 	return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command!");
 		}
	if(sscanf(params,"u",pID,Reason)){
		return SendClientMessage(playerid,COLOR_RED,"|| Usage: /unmute [playerid] ||");
		}
	if(!IsPlayerConnected(pID)) {
	    return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
	    }

	new
	        name[MAX_PLAYER_NAME],
	        string[128], string2[128];
	GetPlayerName(pID,name,sizeof(name));
	format(string,sizeof(string),"**(ADMIN UNMUTE)** %s(%d)",name,pID,Reason);
	format(string2,sizeof(string2),"You Have Been UNMUTED By Admin");
	SendClientMessageToAll(COLOR_RED,string);
	SendClientMessage(i,COLOR_RED,string2);
	Muted[pID] = 0;
  	return 1;
}
Код:
dcmd_jail(playerid,params[])
{
	new
	    Reason[256],
	    pID,
	    i;
    if(Player[playerid][admin] < 3){
	 	return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command!");
 		}
	if(sscanf(params,"us",pID,Reason)){
		return SendClientMessage(playerid,COLOR_RED,"|| Usage: /jail [playerid] [reason] ||");
		}
	if(!IsPlayerConnected(pID)) {
	    return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
	    }
	new
	        name[MAX_PLAYER_NAME],
	        string[128], string3[128], player1;
	GetPlayerName(pID,name,sizeof(name));
	format(string,sizeof(string),"**(ADMIN JAIL)** %s(%d) %s READ /Rules",name,pID,Reason);
	format(string3,sizeof(string3),"You Have Been JALIED By Admin For Reason: %s",Reason);
	SendClientMessageToAll(COLOR_RED,string);
	SendClientMessage(i,COLOR_RED,string3);
 	SetPlayerInterior(pID, 6);
   	SetPlayerPos(pID,264.6288,77.5742,1001.0391);
   	ResetPlayerWeapons(pID);
   	SetTimerEx("JailPlayer",5000,0,"d",player1);
   	SaveToFile("JailWarns",string); Jailed[pID] = 1;
  	return 1;
}
Код:
dcmd_unjail(playerid,params[])
{
	new
	    Reason[256],
	    pID;
    if(Player[playerid][admin] < 3){
	 	return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command!");
 		}
	if(sscanf(params,"u",pID,Reason)){
		return SendClientMessage(playerid,COLOR_RED,"|| Usage: /unjail [playerid] ||");
		}
	if(!IsPlayerConnected(pID)) {
	    return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
		}
	new
	        name[MAX_PLAYER_NAME],
	        string[128], string2[128];
	GetPlayerName(pID,name,sizeof(name));
	format(string,sizeof(string),"**(ADMIN UNJAIL)** %s(%d)",name,pID);
	format(string2,sizeof(string2),"You Have Been UNJALIED By Admin");
	SendClientMessageToAll(COLOR_RED,string);
	SendClientMessage(pID,COLOR_RED,string2);
 	SetPlayerInterior(pID, 6);
   	SetPlayerPos(pID,264.6288,80.5742,1001.0391);
   	ResetPlayerWeapons(pID);
   	Jailed[pID] = 0;
  	return 1;
}
Код:
dcmd_freeze(playerid,params[])
{
		new
            Reason[256],
            pID;
		if(Player[playerid][admin] < 1){
	    return SendClientMessage (playerid,COLOR_RED,"You Dont Have Right To Use This Command");
		}
		if(sscanf(params,"us",pID,Reason)){
	    return SendClientMessage(playerid,COLOR_RED,"|| Usage: /freeze [playerid] [reason] ||");
		}
		if(!IsPlayerConnected(pID)){
	    return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
		}
		new string[128], string2[128], string3[128], adminname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
		GetPlayerName(playerid,adminname,sizeof(adminname));
		GetPlayerName(pID,name,sizeof(name));
		format(string,sizeof(string),"**(ADMIN FREEZE)** %s(%d) %s READ /Rules",name,pID,Reason);
		format(string3,sizeof(string3),"You Have Been FORZEN By Admin For: %s",Reason);
		SendClientMessageToAll(COLOR_RED,string);
		SendClientMessageToAll(COLOR_RED,string2);
		SendClientMessage(playerid, COLOR_RED,string3);
		TogglePlayerControllable(pID, 0);
		SaveToFile("FreezeWarns",string3);
		return 1;
}
Код:
dcmd_unfreeze(playerid,params[])
{
	if(Player[playerid][admin] < 1){
	    return SendClientMessage (playerid,COLOR_RED,"You Dont Have Right To Use This Command");
	}
	new pID;
	if(sscanf(params,"u",pID)){
	    return SendClientMessage(playerid,COLOR_RED,"|| Usage: /unfreeze [playerid] ||");
	}
	if(!IsPlayerConnected(pID)){
	    return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
	}
	new string[128], string2[128], name[MAX_PLAYER_NAME];
	GetPlayerName(pID,name,sizeof(name));
	format(string,sizeof(string),"**(ADMIN UNFREEZE)** %s(%d) READ /Rules",name,pID);
	format(string2,sizeof(string2),"You Have Been UNFORZEN By Admin");
	SendClientMessageToAll(COLOR_RED,string);
	SendClientMessage(playerid, COLOR_RED,string2);
	TogglePlayerControllable(pID, 1);
	return 1;
}
Reply
#2

This script is only compatible with your admin system.
Reply
#3

Any errors when compiling?
Reply
#4

no errors all work but i need to make it when i jail someone cant jail him again mean say this player already in jail when i unjail him and try to unjail at same time say this player is not in jail thats all!!!
Reply
#5

Please help where is the scripters ??!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)