10.09.2011, 09:34
hello guys i tried to fix a Dialog for a friend but it dont work right its not teleporting you to the Position You Select
^
|
|
|
|
The Code
Please Help Me
regards,
Zonoya
[NOTE: the Dialog ids are 2, 3, 4 and 5 Because i have a dialog with ID 1]
Код:
#include <a_samp> public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp("/Police_Rescue", cmdtext, true, 7)) { ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Choose rescue point","LVPD\nSFPD","Rescue","Cancel"); return 1; } if(!strcmp("/Trucker_Rescue", cmdtext, true, 7)) { ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Choose rescue point","LV TRUCK\nWillowfield\nRock Shore Depot","Rescue","Cancel"); return 1; } if(!strcmp("/Assistance_Rescue", cmdtext, true, 7)) { ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Choose rescue point","BlueBerry Garage\nRock Shore Depot","Rescue","Cancel"); return 1; } if(!strcmp("/Bus_Rescue", cmdtext, true, 7)) { ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"Choose rescue point","LS Bus Depot\nLV Bus Terminal","Rescue","Cancel"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response) { switch(dialogid) { case 2: { switch(listitem) { case 0: //Add another 'case' but with +1 id and change the cords/name { SetPlayerPos(playerid,2296.7986,2450.9976,10.8203); SetPlayerFacingAngle(playerid,94.1423); SendClientMessage(playerid,0xFFFF00FF,"You have been rescued to LVPD HQ"); SendClientMessage(playerid,0xFFFF00FF,"Rescue fee: $200"); GivePlayerMoney(playerid, -200); } case 1: { SetPlayerPos(playerid,2296.79885674216534165326,2450.9976,10.8203); SetPlayerFacingAngle(playerid,94.1423); SendClientMessage(playerid,0xFFFF00FF,"You have been rescued to SFPD HQ"); SendClientMessage(playerid,0xFFFF00FF,"Rescue fee: $200"); GivePlayerMoney(playerid, -200); } } } case 3: { switch(listitem) case 5: { switch(listitem) { case 0: { SetPlayerPos(playerid,56.0339,-186.9275,1.8145); SetPlayerFacingAngle(playerid,96.8919); SendClientMessage(playerid,0x00B82EFF,"You have been rescued to BlueBerry Garage"); SendClientMessage(playerid,0x00B82EFF,"Rescue fee: $200"); GivePlayerMoney(playerid, -200); } case 1: { SetPlayerPos(playerid,2817.3284,972.9627,10.7500); SetPlayerFacingAngle(playerid,96.8919); SendClientMessage(playerid,0x00B82EFF,"You have been rescued to Rock Shore Depot"); SendClientMessage(playerid,0x00B82EFF,"Rescue fee: $200"); GivePlayerMoney(playerid, -200); } } } } } return 0; }
|
|
|
|
The Code
Please Help Me
regards,
Zonoya
[NOTE: the Dialog ids are 2, 3, 4 and 5 Because i have a dialog with ID 1]