17.11.2009, 12:58
Hi, Ive made automatic gates, So when i goto LSPD the gates open themselfs rather than a command,
So anyway heres my code, It compiles with no errors, But when i get to the coords, Nothing happens, The gate stays closed...
I dont know that much about coding and i know ive done something wrong, Maybe you can tell me :P
So anyway heres my code, It compiles with no errors, But when i get to the coords, Nothing happens, The gate stays closed...
pawn Код:
forward automaticgates(i,playerid);
forward lspdclosing();
public lspdclosing()
{
MoveObject(lspdgate,1588.5617, -1638.0871, 12.7200,1);
}
public automaticlspd(i,playerid)
{
if(PlayerToPoint(20.0, i,1588.3677,-1636.7367,13.4087))
{
MoveObject(lspdgate,1588.5617, -1638.0871, 5.7200,2);
SetTimer("lspdclosing",5000,false);
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not near a openable gate");
}
}