29.03.2014, 08:24
I created two dialogs, but when I walk into a pickup, these overlap.
Код:
if(dialogid == DIALOG_GS) { if(response) { switch(listitem) { case 0: { GivePlayerMoney(playerid, -500); GivePlayerWeapon(playerid, 14, 1); SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit o floare pentru {00FF40}500${FFFFFF}."); } case 1: { GivePlayerMoney(playerid, -1500); GivePlayerWeapon(playerid, 23, 30); SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un SILENCED 9MM cu 30 gloante pentru {00FF40}1.500${FFFFFF}."); } case 2: { GivePlayerMoney(playerid, -2500); GivePlayerWeapon(playerid, 24, 30);//deagle SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un DEAGLE cu 30 gloante pentru {00FF40}2.500${FFFFFF}."); } case 3: { GivePlayerMoney(playerid, -3500); GivePlayerWeapon(playerid, 25, 30); SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un Shotgun cu 30 gloante pentru {00FF40}3.500${FFFFFF}."); } case 4: { GivePlayerMoney(playerid, -4500); GivePlayerWeapon(playerid, 29, 30); SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un MP5 cu 30 gloante pentru {00FF40}4.500${FFFFFF}."); } case 5: { GivePlayerMoney(playerid, -5500); GivePlayerWeapon(playerid, 31, 30); SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai primit un M4 cu 30 gloante pentru {00FF40}5.500${FFFFFF}."); } } } } if(dialogid == DIALOG_BURGER) { if(response) { switch(listitem)// Checking which item was chosen { case 0: { GivePlayerMoney(playerid, -5); SetPlayerHealth(playerid, 35.0); SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat un PEPSI({00FF40}5$){FFFFFF}. Viata ta este acum {FF0000}35%{FFFFFF}."); ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1); } case 1: { GivePlayerMoney(playerid, -5); SetPlayerHealth(playerid, 35.0); SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat o FANTA({00FF40}5$){FFFFFF}. Viata ta este acum {FF0000}35%{FFFFFF}."); ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1); } case 2: { GivePlayerMoney(playerid, -5); SetPlayerHealth(playerid, 35.0); SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat o COLA({00FF40}5$){FFFFFF}. Viata ta este acum {FF0000}35%{FFFFFF}."); ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1); } case 3: { GivePlayerMoney(playerid, -15); SetPlayerHealth(playerid, 50.0); SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat cartofi prajiti({00FF40}15$){FFFFFF}. Viata ta este acum {FF0000}50%{FFFFFF}."); ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1); } case 4: { GivePlayerMoney(playerid, -25); SetPlayerHealth(playerid, 75.0); SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat un HAMBURGER({00FF40}25$){FFFFFF}. Viata ta este acum {FF0000}75%{FFFFFF}."); ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1); } case 5: { GivePlayerMoney(playerid, -30); SetPlayerHealth(playerid, 100.0); SendClientMessage(playerid, 0xFFFFFFC8, "{FFFFFF}Ai cumparat un DUBLU-HAMBURGER({00FF40}30$){FFFFFF}. Viata ta este acum {FF0000}100%{FFFFFF}."); ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,1,1,1,1,1,1); } } } }