Help Just 2 Simple auto gates
#10

Well make sure you're following and do exactly and it should work.

Go to the top of your script where all your news and add the line below :

pawn Код:
new
gate1,
    gate22;
Go under OnGameModeInit and copy the line below :

pawn Код:
gate1 = CreateDynamicObject(objectid,x,y,z,0.0000000,0.0000000,0.0000000); // x,y,z = where u want ur gate
gate2 = CreateDynamicObject(objectid,x,y,z,0.0000000,0.0000000,0.0000000); // x,y,z = where u want ur gate
The command to open the gates : /opengates
pawn Код:
COMMAND:opengates(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0,x,y,z)) // the cords of the gate what u putted under ongamemodeinit
    {
        MoveDynamicObject(gate1,x,y,z,0.50); // x,y,z = where u want it to move!
        SendClientMessage(playerid, 0xFFFFFFFF, "gate has been opened");
        return 1;
    }
 else if(IsPlayerInRangeOfPoint(playerid, 2.0,x,y,z)) x,y,z=cords of 2nd gate
    {
        MoveDynamicObject(gate2,x,y,z,0.50); // x,y,z = where u want it to move
        SendClientMessage(playerid, 0xFFFFFFFF, "gate has been opened");
        return 1;
    }
}
Reply


Messages In This Thread
Help Just 2 Simple auto gates - by donhu789 - 24.09.2013, 15:00
Re: Help Just 2 Simple auto gates - by donhu789 - 24.09.2013, 15:05
Re: Help Just 2 Simple auto gates - by Voxel - 24.09.2013, 15:05
Re: Help Just 2 Simple auto gates - by donhu789 - 24.09.2013, 15:07
Re: Help Just 2 Simple auto gates - by donhu789 - 24.09.2013, 15:09
Re: Help Just 2 Simple auto gates - by XStormiest - 24.09.2013, 15:23
Re: Help Just 2 Simple auto gates - by JimmyCh - 24.09.2013, 15:28
Re: Help Just 2 Simple auto gates - by donhu789 - 25.09.2013, 04:11
Re: Help Just 2 Simple auto gates - by donhu789 - 25.09.2013, 04:13
Re: Help Just 2 Simple auto gates - by JamesH - 25.09.2013, 05:02

Forum Jump:


Users browsing this thread: 1 Guest(s)