help with gates!!!
#2

https://sampwiki.blast.hk/wiki/CreateObject

X, Y, Z - this is coordinations of your gate. To make it.. example for move you need to make this:

pawn Код:
#include        "a_samp"

new MyMovableGate;

public OnGameModeInit()
{
    MyMovableGate = CreateObject(modelid, X, Y, Z, rX, rY, rZ, DrawDistance);
    return true;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/openmygate", cmdtext, true, 10) == 0)
    {
        MoveObject(MyMovableGate, X, Y, Z, Speed); // X, Y, Z of the gate opened.
        return true;
    }
   
    if(strcmp("/closemygate", cmdtext, true, 11) == 0)
    {
        MoveObject(MyMovableGate, X, Y, Z, Speed); // X, Y, Z of the gate closed.
        return true;
    }
   
    // Speed should be 4.0.
    return false;
}
Reply


Messages In This Thread
help with gates!!! - by ahmed2793 - 10.08.2011, 11:22
Re: help with gates!!! - by Riddick94 - 10.08.2011, 11:33
Re : help with gates!!! - by ahmed2793 - 10.08.2011, 11:35
Re: help with gates!!! - by Riddick94 - 10.08.2011, 11:36
Re : help with gates!!! - by ahmed2793 - 10.08.2011, 11:38
Re : help with gates!!! - by ahmed2793 - 10.08.2011, 11:41
Re: help with gates!!! - by Riddick94 - 10.08.2011, 11:45
Re : help with gates!!! - by ahmed2793 - 10.08.2011, 11:49
Re: help with gates!!! - by Riddick94 - 10.08.2011, 11:52
Re : help with gates!!! - by ahmed2793 - 10.08.2011, 11:57

Forum Jump:


Users browsing this thread: 1 Guest(s)