23.11.2009, 17:27
Hello all..
Im making my first map....
It will be autogates
My autogates wont work... I made that, if player is in any police car gate opens, if he is in right place gates open..
here is my script.... i know shame on me..
The gates wont move
i have dona all this with cmds and works perfect...
Im making my first map....
It will be autogates
My autogates wont work... I made that, if player is in any police car gate opens, if he is in right place gates open..
here is my script.... i know shame on me..
Code:
public autogates(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
GetPlayerVehicleID(playerid);
if(isacar(vehicleid) == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 25, 1544.7, -1628.0, 14.0))
{
MoveObject(lsdpprieksa, 1544.7757568359, -1636.0593261719, 14.057502746582, 3); //vala
}
else if(IsPlayerInRangeOfPoint(playerid, 26, 1544.7, -1628.0, 14.0))
{
MoveObject(lsdpprieksa, 1544.7757568359, -1628.0593261719, 14.057502746582, 3); //ciet
}
else if(IsPlayerInRangeOfPoint(playerid, 25, 1588.181640625, -1637.8323974609, 15.19012260437))
{
MoveObject(lsdpgaraza, 1598.181640625, -1637.8323974609, 15.19012260437, 3); //vala
}
else if(IsPlayerInRangeOfPoint(playerid, 26, 1588.181640625, -1637.8323974609, 15.19012260437))
{
MoveObject(lsdpgaraza, 1588.181640625, -1637.8323974609, 15.19012260437, 3); //ciet
}
}
else if(isacar(vehicleid) == 0)
{
SendClientMessage(playerid, COLOR_5,"Error: You need to be in any police car!");
}
return 0;
}
i have dona all this with cmds and works perfect...

