SA-MP Forums Archive
LS ELEVATOR - 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: LS ELEVATOR (/showthread.php?tid=380920)



LS ELEVATOR - trapstar2020 - 27.09.2012

im trying to make ls elevator with password 2 use the floors but all has fail anyone who ever tried this can post a reply with any tips?


Re: LS ELEVATOR - newbienoob - 27.09.2012

pawn Код:
//at the top
#define epass "changeme" //define your elevator password

//command (zcmd)
CMD:elevator(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid,1,x,y,z)) //check if they are near the elevator.
    {//if they're near the elevator, then show them a dialog box
        ShowPlayerDialog(playerid,6287,DIALOG_STYLE_INPUT,"Enter the password", "In order to use this elevator, you need to enter the password below.","Enter","Cancel"); //now they need to enter the password
    }
    //if they're not near the elevator, then...
    else return SendClientMessage(playerid,-1,"You are not near the elevator!");
    return 1;
}

//OnDialogResponse
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 6287 && response)
    {
        if(!strcmp(epass,inputtext,true))//if they've entered a correct password, then
        {
            //move the the elevator
        }
        else return SendClientMessage(playerid,-1,"Wrong Password!");//if they've entered a wrong password
    }
    return 1;
}



Re: LS ELEVATOR - trapstar2020 - 27.09.2012

iz it possible u can edit for me in a FS form and i password for each floor? all credits would be shown on my server