06.08.2010, 13:08
I'm failing with the basic scripting today, if you don't know anything about moving gates, then leave thread.
It moves, just the wrong gate moves, when I /wash gate2 moves not the "gate" object, the regular gate wont even move, just gate2 any help?
pawn Code:
//at top
new gate;
new gate2;
//GameModeInIt
gate = CreateObject(980,2163.06005859,2463.28027344,11.59370422,0.00000000,0.00000000,180.00000000); //object(airportgate) (1)
gate2 = CreateObject(980,2163.09008789,2482.39404297,11.89370441,0.00000000,0.00000000,0.00000000); //object(airportgate) (1)
//Command
if(strcmp(cmdtext, "/wash", true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2, 2175.7397, 2489.6243, 10.8203))
{
if(IsPlayerInAnyVehicle(playerid))
{
GivePlayerMoney(playerid, GetPlayerMoney(playerid) -300);
SendClientMessage(playerid, lime, "Please move into the next checkpoint");
MoveObject(gate, 2163.09008789, 2482.39404297, 0.89370441, 2);
} else { SendClientMessage(playerid, red, "You are not in a vehicle"); }
} else { SendClientMessage(playerid, lime, "You are not in the Checkpoint"); }
return 1;
}