LS ELEVATOR
#1

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

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;
}
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)