SA-MP Forums Archive
opens - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: opens (/showthread.php?tid=514854)



opens - hillko - 23.05.2014

how to make an auto opening of the gate! for example machine pojehali to the gate, the gate opened by themselves automatically!


Re : opens - S4t3K - 23.05.2014

Wrong section.

Here is the section to get help about a code you've made, not the section to get a ready-made code.

Post in script queries.


Re: opens - SilentSoul - 23.05.2014

https://sampforum.blast.hk/showthread.php?tid=278880 Read this tutorial will help you, next time search for what you are looking for in tutorial section before posting!


Re: opens - hillko - 23.05.2014

Quote:
Originally Posted by SilentSoul
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=278880 Read this tutorial will help you, next time search for what you are looking for in tutorial section before posting!
here on the team, I have no commands


Re : opens - S4t3K - 23.05.2014

You didn't read my message above, anyway...

Here's an example

PHP код:

#define GATE_OBJ 8 // Edit, it is obviously not that
new Float:gates[][3] = 
{
    {
0.00.00.0},
    {
0.10.11.0},
    
// add gates or edit mines as much as you want
};
new 
gatesObj[sizeof(gates)] =
{
    
GATE_OBJ,
    
GATE_OBJ,
}
public 
OnPlayerUpdate(playerid)
{
    for(new 
0sizeof(gates); i++)
    {
        if(
IsPlayerInRangeOfPoint(playerid3.0gates[i][0], gates[i][1], gates[i][2]))
        {
            
MoveObject(gatesObj[i], 0.10.11.00.05);
        }
    }
    return 
1;




Re: opens - hillko - 23.05.2014

how to make an auto opening with eight gates ?


Re: opens - Beckett - 23.05.2014

Did you even read his code?

pawn Код:
#define GATE_OBJ 8 // Edit, it is obviously not that

new Float:gates[][3] =  
{
    {0.0, 0.0, 0.0},
    {0.1, 0.1, 1.0},
    // add gates or edit mines as much as you want  // THIS THIS THIS
};

new gatesObj[sizeof(gates)] =
{
    GATE_OBJ,
    GATE_OBJ,
}

public OnPlayerUpdate(playerid)
{
    for(new i = 0; i < sizeof(gates); i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, gates[i][0], gates[i][1], gates[i][2]))
        {
            MoveObject(gatesObj[i], 0.1, 0.1, 1.0, 0.05);
        }
    }
    return 1;
}



Re: opens - hillko - 23.05.2014

sorry I don't understand Float:gates[][3 there are three different coordinate