NEED A SCRIPT WHICH WILL DISABLE ALL COMMANDS, WHEN YOUR IN JAIL?
#10

Quote:
Originally Posted by NeRoSiS
This at the top

Код:
new IsJailed[MAX_PLAYERS];
Add this to your jail command, be warned, yours may not be giveplayername, it may be pname or something,.

Код:
IsJailed[giveplayerid] = 1;
Unjailll...

Код:
IsJailed[giveplayerid] = 0;
Then under oncommand etxt add this

Код:
if(IsJailed[playerid] == 1)
{
return 1;
}
this is the code i have

Код:
new Jailed[MAX_PLAYERS];


public OnPlayerSpawn(playerid)
{
	if(Jailed[playerid] == 1)
	{
	  SetPlayerPos(playerid, ...); // Enter your jail co ords here
	}
	return 1;
}

public Timer(playerid)
{
	SendClientMessageToAll(COLOR_YELLOW, "Please Visit us here at, Kontrol-Gaming.co.cc"); // Color can be edited, Look at top for the colors.
	SendClientMessageToAll(COLOR_YELLOW, " Please remember to report any bugs you may find, /Bug <Message>");

	for(new a=0; a<MAX_PLAYERS; a++)
  {
		if(GetPlayerMoney(a) < 0)
		{
		  SetPlayerPos(playerid, ...); // Enter you jail co ords here
		  Jailed[a] = 1;
		  SetTimerEx("UnJailTimer", 80000, 0, "d", a); // I think 80000 milliseconds is 3 mins, Correct it if its wrong
		}
		GivePlayerMoney(a, 1000);
	}
	SendClientMessageToAll(COLOR_LIGHTGREEN, "You've recieved playing money **$1000**!");
}

public UnJailTimer(playerid)
{
	Jailed[playerid] = 0;
	return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)