Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new ascensore;
- #define DIALOG_ASCENSORE 5500
- Create3DTextLabel("[Premi Y per usare l'Ascensore]", 0xFFFFFFFF, 1776.1543,-1774.4171,13.5407, 10.0, 0, 0);
- Create3DTextLabel("[Premi Y per usare l'Ascensore]", 0xFFFFFFFF, 1776.1543,-1774.4171,42.6567, 10.0, 0, 0);
- ascensore = CreateObject(2669, 1777.37927, -1777.52820, 14.01590, 0.00000, 0.00000, 179.62450);
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (newkeys == KEY_YES)
- {
- if(IsPlayerInRangeOfPoint(playerid,5.0,1777.37927, -1777.52820, 14.01590) || IsPlayerInRangeOfPoint(playerid,5.0,1777.37927, -1777.52820, 42.89976))
- {
- ShowPlayerDialog(playerid,DIALOG_ASCENSORE,DIALOG_STYLE_LIST, "Ascensore", "Chiama Ascensore\nPiano Terra\nUltimo Piano","Seleziona","Esci");
- return 1;
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid==DIALOG_ASCENSORE)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(IsPlayerInRangeOfPoint(playerid,5.0,1777.37927, -1777.52820, 14.01590)){MoveObject(ascensore, 1777.37927, -1777.52820, 14.01590, 5.00);}
- if(IsPlayerInRangeOfPoint(playerid,5.0,1777.37927, -1777.52820, 42.89976)){MoveObject(ascensore, 1777.37927, -1777.52820, 42.89976, 5.00);}
- }
- case 1: MoveObject(ascensore, 1777.37927, -1777.52820, 14.01590, 5.00);
- case 2: MoveObject(ascensore, 1777.37927, -1777.52820, 42.89976, 5.00);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement