22.06.2010, 03:52
Script:
Problems:
When I go in the game and type /elevator, the dialog pops up I select my floor and click Use then its just disapears and nothing happens... How do I fix it?
Code:
dcmd_elevator(playerid, params[]) { if(PlayerInfo[playerid][Special] == 1) { if(IsPlayerInRangeOfPoint(playerid,1,2296.523193,2468.725341,10.820312)) //garage elevator { ShowPlayerDialog(playerid, 911,DIALOG_STYLE_LIST,"Choose a floor...","R\nM\nB2\nB3","Use","Leave"); } if(IsPlayerInRangeOfPoint(playerid,1,2268.147949,2448.327880,3.531250)) //impound lot elevator { ShowPlayerDialog(playerid, 912,DIALOG_STYLE_LIST,"Choose a floor...","R\nM\nB1\nB3","Use","Leave"); } if(IsPlayerInRangeOfPoint(playerid,1,2267.936523,2448.448486,-7.195312)) //swat level elevator { ShowPlayerDialog(playerid, 913,DIALOG_STYLE_LIST,"Choose a floor...","R\nM\nB1\nB2","Use","Leave"); } if(IsPlayerInRangeOfPoint(playerid,1,2268.9697,2458.9207,38.6837)) //roof elevator { ShowPlayerDialog(playerid, 914,DIALOG_STYLE_LIST,"Choose a floor...","M\nB1\nB2\nB3","Use","Leave"); } if(IsPlayerInRangeOfPoint(playerid,1,237.3105,195.6100,1008.1719)) //main elevator { ShowPlayerDialog(playerid, 915,DIALOG_STYLE_LIST,"Choose a floor...","R\nB1\nB2\nB3","Use","Leave"); } } #pragma unused params return 1; }
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 911 && response) { switch(listitem) { case 0: { SetPlayerPos(playerid,2268.9697,2458.9207,38.6837); SetPlayerFacingAngle(playerid,0); } case 1: { SetPlayerInterior(playerid,3); SetPlayerPos(playerid,237.3105,195.6100,1008.1719); SetPlayerFacingAngle(playerid,270); } case 2: { SetPlayerPos(playerid,2268.147949,2448.327880,3.531250); SetPlayerFacingAngle(playerid, 180); } case 3: { SetPlayerPos(playerid,2267.936523,2448.448486,-7.195312); SetPlayerFacingAngle(playerid,180); } } } if(dialogid == 912 && response) { switch(listitem) { case 0: { SetPlayerPos(playerid,2268.9697,2458.9207,38.6837); SetPlayerFacingAngle(playerid,0); } case 1: { SetPlayerInterior(playerid,3); SetPlayerPos(playerid,237.3105,195.6100,1008.1719); SetPlayerFacingAngle(playerid,270); } case 2: { SetPlayerPos(playerid,2296.523193,2468.725341,10.820312); SetPlayerFacingAngle(playerid, 270); } case 3: { SetPlayerPos(playerid,2267.936523,2448.448486,-7.195312); SetPlayerFacingAngle(playerid,180); } } } if(dialogid == 913 && response) { switch(listitem) { case 0: { SetPlayerPos(playerid,2268.9697,2458.9207,38.6837); SetPlayerFacingAngle(playerid,0); } case 1: { SetPlayerInterior(playerid,3); SetPlayerPos(playerid,237.3105,195.6100,1008.1719); SetPlayerFacingAngle(playerid,270); } case 2: { SetPlayerPos(playerid,2296.523193,2468.725341,10.820312); SetPlayerFacingAngle(playerid, 270); } case 3: { SetPlayerPos(playerid,2268.147949,2448.327880,3.531250); SetPlayerFacingAngle(playerid,180); } } } if(dialogid == 914 && response) { switch(listitem) { case 0: { SetPlayerInterior(playerid,3); SetPlayerPos(playerid,237.3105,195.6100,1008.1719); SetPlayerFacingAngle(playerid,270); } case 1: { SetPlayerPos(playerid,2296.523193,2468.725341,10.820312); SetPlayerFacingAngle(playerid,270); } case 2: { SetPlayerPos(playerid,2268.147949,2448.327880,3.531250); SetPlayerFacingAngle(playerid, 180); } case 3: { SetPlayerPos(playerid,2267.936523,2448.448486,-7.195312); SetPlayerFacingAngle(playerid,180); } } } if(dialogid == 915 && response) { switch(listitem) { case 0: { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,2268.9697,2458.9207,38.6837); SetPlayerFacingAngle(playerid,0); } case 1: { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,2296.523193,2468.725341,10.820312); SetPlayerFacingAngle(playerid, 270); } case 2: { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,2268.147949,2448.327880,3.531250); SetPlayerFacingAngle(playerid, 180); } case 3: { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,2267.936523,2448.448486,-7.195312); SetPlayerFacingAngle(playerid,180); } } } return 1; }
When I go in the game and type /elevator, the dialog pops up I select my floor and click Use then its just disapears and nothing happens... How do I fix it?