gate with password
#1

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

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

Can give me link to it?
Reply
#4

is really eazy like command you will you pass and is done simple
Reply
#5

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

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. ^^
Reply
#7

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?
Reply
#8

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.
Reply
#9

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.
Reply
#10

Thanks guys you are so helpfull =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)