05.08.2012, 20:16
Gostava de saber como adicionar outra linha para o switch(3) й que eu tento e ta sempre dando erro ou seja para dialogid 3
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response)// They pressed the first button. { switch(1)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs. { case 1:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Animaзхes disponiveis", "{FF8200}/sit /kiss /wank /handsup /drunk /bomb /getarrested /laugh /lookout /robman\n{FF8200}/adie /medic /crossarms /lay /ahide /vomit /eat /wave /taichi\n{FF8200}/deal /crack /smokem /smokef /groundsit /chat /fucku\n{FF8200}/handsup /cellin /cellout /beer /wine /sprunk /ciggy /piss /dance\n", "Ok", "Cancel"); } case 1: // The second item listed { ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "CORES DISPONIVEIS", "{F60000}/Vermelho\n{21DD00}/Verde\n{FF6EB4}/Rosa\n{0000FF}/Azul\n{FFFFFF}/Branco\n{9400D3}/Roxo\n{00F5FF}/Turquesa\n{1E90FF}/Azul C\n{FFFF00}/Amarelo\n{000000}/Preto\n{00BFFF}/Azul F\n{CD661D}/Chocolate\n{8968CD}/Roxo M\n{FF1493}/Rosa P\n{FFA500}/Laranja\n", "Ok", "Cancel"); } case 2: // The third item listed { SendClientMessage(playerid, 0x990000DD, "-----------------------------------------------------------------------KITS-------------------------------------------------------------------"); SendClientMessage(playerid, COLOR_GREEN, "Escolhe o Kit que mais te desperta а Atenзгo! E adquire-o digitando o cmd"); SendClientMessage(playerid, COLOR_YELLOW, "Knife--9mm--Shotgun--Micro SMG/Uzi--Country Riffle--Molotov Cocktail == {FF6600}Custo: 500Ј {FF0000}/Kit1"); SendClientMessage(playerid, COLOR_YELLOW, "Knife--Silenced 9mm--Shotgun--Tec-9--Country Riffle--Tear Gas == {FF6600}Custo: 600Ј {FF0000}/Kit2"); SendClientMessage(playerid, COLOR_YELLOW, "Knife--Desert Eagle--Combat Shotgun--Tec-9--Country Riffle--AK-47--Molotov Cocktail == {FF6600}Custo: 850Ј {FF0000}/Kit3"); SendClientMessage(playerid, COLOR_YELLOW, "Chainsaw--Desert Eagle--Combat Shotgun--Tec-9--Sniper Rifle--AK-47--Grenade == {FF6600}Custo: 1000Ј {FF0000}/Kit4"); SendClientMessage(playerid, COLOR_YELLOW, "Chainsaw--Desert Eagle--Combat Shotgun--MP5--Sniper Rifle--M4--Grenade == {FF6600}Custo: 1250Ј {FF0000}/Kit5"); SendClientMessage(playerid, COLOR_YELLOW, "Chainsaw--Desert Eagle--Sawnoff Shotgun--MP5--Sniper Rifle--M4--Grenade == {FF6600}Custo: 1500Ј {FF0000}/Kit6"); SendClientMessage(playerid, COLOR_BROWN, "------------------------------------------------------------------------------------------------------------------------------------------------"); } case 3: // The third item listed { SetPlayerHealth(playerid, 0.0); } case 4: // The third item listed { if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_YELLOW, "Nгo tens {008000}DINHEIRO {FFFF00}suficiente."); SetPlayerHealth(playerid, 100.0); SendClientMessage(playerid, 0x33AA33AA, "A sua vida foi restabelecida!"); GivePlayerMoney(playerid, -1000); } case 5: // The third item listed { if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLOR_YELLOW, "Nгo tens {008000}DINHEIRO {FFFF00}suficiente."); if(IsPlayerInAnyVehicle(playerid)) { RepairVehicle(GetPlayerVehicleID(playerid)); SendClientMessage(playerid, 0x33AA33AA, "O Seu Veiculo Foi Reparado!"); GivePlayerMoney(playerid, -500); } else SendClientMessage(playerid, 0xAA3333AA, "Voce nao estб no veiculo!"); } } } } } return 1; }