02.04.2019, 02:14
Estou meio cansado mas ver ai se estб certo.
@Edit
PHP Code:
//Acredito que o "CreateDynamicObject" nгo atrapalhe. Mas testa ae
PortaoPeni = CreateObject(980,666.5000000,-2871.3000500,14.9000000,0.0000000,0.0000000,326.0000000);
PHP Code:
if(strcmp(cmd, "/ppeni", true)==0)
{ //Й melhor usar IsPlayerInRangeOfPoint nгo ?
if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 7.0, 666.50000,-2871.30005,14.90000))
{
MoveObject(PortaoPeni,666.50000,-2871.30000,9.40000,3.0);
SetTimerEx("ClosedPortaoPeni", 10000, false, "i", playerid); //Use a funзгo playerid
SendClientMessage(playerid, COLOR_YELLOW, "| INFO | Portao Penitenciaria aberto, fecharб em 10 segundos!");
return 1;
}
}
PHP Code:
forward ClosedPortaoPeni(playerid);//Use a funзгo playerid
public ClosedPortaoPeni(playerid)
{
MoveObject(PortaoPeni,666.5000000,-2871.3000500,14.9000000,3.0);
return 1;
}