22.09.2012, 13:30
tente
pawn Код:
new PortaRec;
new FecharPRec;
forward FecharPortaoRec();
public OnGameModeInit()
{
PortaRec = CreateObject(8957, 250.5, 61.400001525879, 1005.200012207, 0, 0, 0);
return 1;
}
public FecharPortaoRec()
{
MoveObject(FecharPRec, 250.5, 61.400001525879, 1005.200012207, 0, 0, 0, 3.0);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/abrirportrec", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 250.5, 61.400001525879, 1005.200012207))
{
MoveObject(PortaRec, 250.5, 61.400001525879, 999.79998779297, 3.0);
SetTimer("FecharPortaoRec", 12000, 0);
}
return 1; //havia esquecido.
}
return 0;
}