SA-MP Forums Archive
gate with password - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: gate with password (/showthread.php?tid=197744)



gate with password - LegendNissanGTR - 10.12.2010

Hi,is it possible to make a gate with password example /open 1234 and it automatically close?


Re: gate with password - kiss - 10.12.2010

Yea it's possible...
Download and watch moderntopia /gateopen codes


Re: gate with password - LegendNissanGTR - 10.12.2010

Can give me link to it?


Re: gate with password - doreto - 10.12.2010

is really eazy like command you will you pass and is done simple


Re: gate with password - LegendNissanGTR - 10.12.2010

Lol i was asking how to make the gate with password lol


Re: gate with password - Jeffry - 10.12.2010

This:
pawn Код:
if(!strcmp(cmdtext, "/open", true,5))
{
    if(!strcmp(cmdtext[5], "password"))
    {
        //Move gate
    }
    else return SendClientMessage(playerid, RED, "Usage: /open [PASSWORD]");
}
Give it a shot. ^^


Re: gate with password - LegendNissanGTR - 11.12.2010

Thanks For movegate i just do this MoveObject(gate,-2148.93359400,-979.11938500,32.73410400, 2.00);
and is it possible to make the password for the gate and automatic close?


Respuesta: gate with password - RatHack - 11.12.2010

pawn Код:
if(!strcmp(cmdtext, "/close", true,5))
{    
    if(!strcmp(cmdtext[5], "password"))    
    {        
        //Move gate to close  
    }    
    else return SendClientMessage(playerid, YOUR_COLOR, "Usage: /close [PASSWORD]");
}
It should work.


Re: gate with password - Jeffry - 11.12.2010

Command:
pawn Код:
if(!strcmp(cmdtext, "/open", true,5))
{
    if(!strcmp(cmdtext[5], "password"))
    {
        //Move gate
        SetTimerEx("CloseMyGate", 10000, 0); // This will cale the 'CloseMyGate' after 10 seconds.
    }
    else return SendClientMessage(playerid, RED, "Usage: /open [PASSWORD]");
}
And the timer that gets called to close the gate:
pawn Код:
forward CloseMyGate();
public CloseMyGate()
{
    //Move gate back ...
    return 1;
}
Have fun.


Re: gate with password - LegendNissanGTR - 11.12.2010

Thanks guys you are so helpfull =)