19.04.2009, 12:35
Quote:
|
Originally Posted by NeRoSiS
This at the top
Код:
new IsJailed[MAX_PLAYERS]; Код:
IsJailed[giveplayerid] = 1; Код:
IsJailed[giveplayerid] = 0; Код:
if(IsJailed[playerid] == 1)
{
return 1;
}
|
Код:
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;
}

