23.05.2012, 17:54
Hey everyone, brand new to the forums and brand new to scripting so excuse my newbie question, iv searched everywhere high and low and cant seem to find my solution so it looks like ill be asking here, ANYWAYS on to the point... As i was saying im brand new to scripting just started this monday and i followed a tutorial to make a dialog box for teleports and so that you can teleport places, i wanted to make another dialog box that lets a player spawn weapons that i put in and i compiled it and there were about five errors, i fixed all those but theres one that i dont know how to fix here it is :
And normally i would just go delete the other one but since its part of the teles i would have to delete the teles, i asked my freind whos fairly good at pawn, not amazing or anything and he linked me to this, https://sampwiki.blast.hk/wiki/OnDialogResponse i looked it over for a while but still i dont understand what to do :/
here are the two dialog boxs im trying to make....
And then:
thanks in advance guys !
Код:
C:\Users\Me\Desktop\scripting\gamemodes\billjenkins.pwn(483) : error 021: symbol already defined: "OnDialogResponse" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
here are the two dialog boxs im trying to make....
Код:
CMD:teles(playerid, params[]) { ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_LIST, "Teleport Selection", "Los Santos\nSan Fierro\nLas Venturas\nAircraft Carrier\nMount Chilliad\nPig Pen\nShamal\nJefferson Motel\nLSPD\nSFPD\nLVPD\nBinco\nArea 69\nAndromada\nLos Santos Airport\nO.G Loc's\nLiberty City(outside)(buggy)\nBank\n Liberty City(inside)\nLS Atrium\nSherman Damn\n8-Track\nBloodbowl\nDirt Track\nKickstart\nVice Stadium\nStar Tower\nVehicle Basketball", "Select", "Cancel"); } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case 1337: { if (!response) return SendClientMessage(playerid, 0xFF0000FF, "You cancelled."); if(response) { switch(listitem) { case 0: { SetPlayerInterior (playerid, 0); SetPlayerPos(playerid, 2498.5615,-1669.9823,13.3442 ); } case 1: { SetPlayerInterior (playerid, 0); SetPlayerPos (playerid, -2900.9683,464.0657,4.9141 ); } case 2: { SetPlayerInterior (playerid, 0); SetPlayerPos (playerid, 2000.7534,1529.9393,14.6223 ); } case 3: { SetPlayerInterior (playerid, 0); SetPlayerPos (playerid, -1310.8959,499.1293,18.2344 ); } case 4: { SetPlayerInterior (playerid, 0); SetPlayerPos (playerid, -2321.5945,-1636.9006,483.7031); } case 5: { SetPlayerInterior(playerid, 2); SetPlayerPos (playerid, 1204.809936,-11.586799,1000.921875); } case 6: { SetPlayerInterior(playerid, 1); SetPlayerPos (playerid, 1.808619,32.384357,1199.593750); } case 7: { SetPlayerInterior(playerid, 15); SetPlayerPos (playerid, 2215.454833,-1147.475585,1025.796875); } case 8: { SetPlayerInterior(playerid, 6); SetPlayerPos (playerid, 246.783996,63.900199,1003.640625); } case 9: { SetPlayerInterior(playerid, 10); SetPlayerPos (playerid, 246.375991,109.245994,1003.218750); } case 10: { SetPlayerInterior(playerid, 3); SetPlayerPos (playerid, 288.745971,169.350997,1007.171875); } case 11: { SetPlayerInterior(playerid, 15); SetPlayerPos (playerid, 207.737991,-109.019996,1005.132812); } case 12: { SetPlayerInterior(playerid, 0); SetPlayerPos (playerid, 214.3151,1871.5281,13.1406); } case 13: { SetPlayerInterior(playerid, 9); SetPlayerPos (playerid, 315.745086,984.969299,1958.919067); SendClientMessage(playerid, 0xFFFFFFFF, "I wouldn't suggest skydiving, as your in an interior"); } case 14: { SetPlayerInterior(playerid, 0); SetPlayerPos (playerid, 2096.8315,-2454.4473,13.5469); } case 15: { SetPlayerInterior(playerid, 3); SetPlayerPos (playerid, 513.882507,-11.269994,1001.565307); } case 16: { SetPlayerInterior(playerid, 1); SetPlayerPos (playerid, -729.276000,503.086944,1371.971801); } case 17: { SetPlayerInterior(playerid, 0); SetPlayerPos (playerid, 2315.952880,-1.618174,26.742187); } case 18: { SetPlayerInterior(playerid, 1); SetPlayerPos (playerid, -794.806396,497.738037,1376.195312); } case 19: { SetPlayerInterior(playerid, 18); SetPlayerPos (playerid, 1710.433715,-1669.379272,20.225049); } case 20: { SetPlayerInterior(playerid, 17); SetPlayerPos (playerid, -959.564392,1848.576782,9.000000); } case 21: { SetPlayerInterior(playerid, 7); SetPlayerPos (playerid, -1398.065307,-217.028900,1051.115844); } case 22: { SetPlayerInterior(playerid, 15); SetPlayerPos (playerid, -1398.103515,937.631164,1036.479125); } case 23: { SetPlayerInterior(playerid, 4); SetPlayerPos (playerid, -1444.645507,-664.526000,1053.572998); } case 24: { SetPlayerInterior(playerid, 14); SetPlayerPos (playerid, -1465.268676,1557.868286,1052.531250); } case 25: { SetPlayerInterior(playerid, 1); SetPlayerPos (playerid, -1401.829956,107.051300,1032.273437); } case 26: { SetPlayerPos (playerid,1544.9849,-1353.7681,329.4735); SetPlayerInterior(playerid, 0); } case 27: { SetPlayerPos(playerid, 3362.55, -1522.44, 323.67); SetPlayerInterior(playerid, 0); } } } } } return 0; }
Код:
CMD:weapons(playerid, params[]) { ShowPlayerDialog(playerid, 1338, DIALOG_STYLE_LIST, "Weapon Selection", "Deagle\nAK47\nM4\nMP5\nUZI\nTEC9\nBrass knuckles","Select","Cancel"); } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case 1338: { if (!response) return SendClientMessage(playerid, 0xFF0000FF, "You cancelled."); if(response) { switch(listitem) { case 0: { GivePlayerWeapon(playerid, 24,9999); SendClientMessage(playerid, 0xFF9900AA, "You have recieved a deagle!"); } case 1: { GivePlayerWeapon(playerid, 30,9999); SendClientMessage(playerid, 0xFF9900AA, "You have recieved a AK47!"); } case 2: { GivePlayerWeapon(playerid, 31,9999); SendClientMessage(playerid, 0xFF9900AA, "You have recieved a M4!"); } case 3: { GivePlayerWeapon(playerid, 29,9999); SendClientMessage(playerid, 0xFF9900AA, "You have recieved a MP5!"); } case 4: { GivePlayerWeapon(playerid, 28,9999); SendClientMessage(playerid, 0xFF9900AA, "You have recieved a UZI!"); } case 5: { GivePlayerWeapon(playerid, 32,9999); SendClientMessage(playerid, 0xFF9900AA, "You have recieved a TEC9!"); } case 6: { GivePlayerWeapon(playerid, 34,9999); SendClientMessage(playerid, 0xFF9900AA, "You have recieved a Sniper Rifle!"); } case 7: { GivePlayerWeapon(playerid, 1,9999); SendClientMessage(playerid, 0xFF9900AA, "You have revieved Brass Knuckles!"); } } } } } return 0; }