/gate CMD help.
#1

Hello everyone, as you can see, I am new to scripting, and I'd like help about /gate CMD, to make the gate, roll down slowly and rply.

Exc.





Let's say, when I stand close to it, I'll use /gate, and it'll slowly roll down?
How do I make it?
Thanks.
Reply
#2

pawn Код:
new gate; // Make a new variable.
public OnGameModeInit()
{
    // Line below assigns the varable above the gate object.
    gate = CreateObject(/* You would put your gate object code here*/);
    return 1;
}
CMD:gate(playerid,params[])
{
    // You would use the native function "IsPlayerInRangeOfPoint".
    // and insert the coordinates of the gate object instead of x,y,z.
    if(IsPlayerInRangeOfPoint(playerid,10.0,x,y,z)) // The "10.0" param is the radius the player has to be in for the command to work.
    {
        // We will use the MoveObject function to move the gate.
        // So if he IS close to the gate
        MoveObject(gate,/* You would put the new coordinates here.*/);// Notice the first parameter is "gate" which is the variable defined.
    }
    return 1;
}
// This is a very simple run-down on how it is done. Go read some tutorials for more information.
Reply
#3

Thank you very much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)