23/07/2021 12:31
(23/07/2021 12:13)xbruno1000x Escreveu: Crie uma bool: Preso[MAX_PLAYERS] e assinale como verdadeira ao prender alguém. Depois vá na OnPlayerSpawn e crie uma if(Preso[playerid] == true) SetPlayerPos(playerid, X,Y,Z);//Pos da cadeia aqui
Não consigo fazer isso. mas acho que ja tem..
Código PHP:
enum E_PLAYER_CHAIN_ADMIN
{
bool:E_PLAYER_IN_CHAIN,
E_PLAYER_CHAIN_TIME
}
Código PHP:
static PutPlayerInChainAdmin(playerid, time)
{
time = gettime() + time;//(60 * time);
playerChainAdmin[playerid][E_PLAYER_IN_CHAIN] = true;
playerChainAdmin[playerid][E_PLAYER_CHAIN_TIME] = time;
SetPlayerWantedLevel(playerid, 0);
if(IsPlayerCuffed(playerid))
UnshacklePlayer(playerid, REASON_NONE);
if(IsPlayerArrasted(playerid))
ChangePlayerArrestedState(playerid, GetPlayerArrastedMe(playerid), REASON_ADMIN);
if(IsPlayerApproached(playerid))
ChangePlayerApproachedState(playerid, GetPlayerApproachedMe(playerid), REASON_ADMIN);
TogglePlayerControllable(playerid, true);
SetPlayerTeam(playerid, TEAM_JAIL);
SetPlayerVirtualWorld(playerid, 6666);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid, prisionPosition[0], prisionPosition[1], prisionPosition[2]);
SetPlayerFacingAngle(playerid, prisionPosition[3]);
SetCameraBehindPlayer(playerid);
SetTimerEx("ShowPlayerPrisionTime", 900, false, "iii", playerid, time, 1);
}