27.02.2010, 12:30
nope dont work, it will work to copy paste all but here it is alll ondialogrespone
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 2 && response) { switch(listitem) { case 0: { if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy that drug."); GivePlayerMoney(playerid, -10000); SetPlayerDrunkLevel(playerid,6000); SetPlayerHealth(playerid, 100); ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); SendClientMessage(playerid,0x00FF0AFF,"You buy cocaine for 10,000$"); } case 1: { if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy that drug."); GivePlayerMoney(playerid, -2500); SetPlayerDrunkLevel(playerid,3000); ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); SendClientMessage(playerid,0x00FF0AFF,"You buy crack for 2,500$"); } case 2: { if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy that drug."); GivePlayerMoney(playerid, -500); SetPlayerDrunkLevel(playerid,3000); ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); SendClientMessage(playerid,0x00FF0AFF,"You buy marijuana for 500$"); } } } if(dialogid == 3) { if(response) { SendClientMessage(playerid,0x008000FF, "Welcome on server, enjoy"); } else { SendClientMessage(playerid, 0xFF0000FF, "In that case this server is not for you."); new string[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); format(string,sizeof string,"%s Is kicked from server, he dont wanna respect rules.",name); SendClientMessageToAll(0xFF002DFF,string); Kick(playerid); } } } if(dialogid == 4 && response) { switch(listitem) { case 0: { if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy wine."); GivePlayerMoney(playerid, -50); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_WINE); SendClientMessage(playerid,0x00FF0AFF,"You buy wine for 50$"); } case 1: { if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy juice."); GivePlayerMoney(playerid, -25); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK); SendClientMessage(playerid,0x00FF0AFF,"You buy juice for 25$"); } case 2: { if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy lamb."); GivePlayerMoney(playerid, -500); SetPlayerHealth(playerid,100); ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); SendClientMessage(playerid,0x00FF0AFF,"You buy lamb for 500$"); } case 3: { if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy cigarettes."); GivePlayerMoney(playerid, -5); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY); SendClientMessage(playerid,0x00FF0AFF,"You buy cigarettes for 5$"); } case 4: { if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0005FF, "You need more money to buy beer."); GivePlayerMoney(playerid, -100); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER); SendClientMessage(playerid,0x00FF0AFF,"You buy beer for 100$"); } } return 1; } return 0; }