Failing with basics
#1

I'm failing with the basic scripting today, if you don't know anything about moving gates, then leave thread.

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;
    }
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?
Reply
#2

Maybe your Object ID's are mixed up. Happend to me with Pickups.
Try to create the gate2 again, so that you have it twice. Put the first one to some other coords where you don't see it.
Reply
#3

will try one second
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)