#include <a_samp>
//By Exec
#define DIALOG_fegyver 1
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_fegyver && response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 4, 1);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid,-1,\"{99FF33}Vettél egy Knife -t. {FF0000}Ára: -100\");
return 1;
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 24, 99);
GivePlayerMoney(playerid, -1000);
SendClientMessage(playerid,-1,\"{99FF33}Vettél egy Desert Eagle -t. {FF0000}Ára: -1000\");
return 1;
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 25, 100);
GivePlayerMoney(playerid, -2000);
SendClientMessage(playerid,-1,\"{99FF33}Vettél egy ShotGun -t. {FF0000}Ára: -2000 \");
return 1;
}
if(listitem == 3)
{
GivePlayerWeapon(playerid, 29, 123);
GivePlayerMoney(playerid, -1500);
SendClientMessage(playerid,-1,\"{99FF33}Vettél egy MP5 -t. {FF0000}Ára: -1500\");
return 1;
}
if(listitem == 4)
{
GivePlayerWeapon(playerid, 30, 122);
GivePlayerMoney(playerid, -4000);
SendClientMessage(playerid,-1,\"{99FF33}Vettél egy AK-47 -t. {FF0000}Ára: -4000 \");
return 1;
}
if(listitem == 5)
{
GivePlayerWeapon(playerid, 31, 800);
GivePlayerMoney(playerid, -4500);
SendClientMessage(playerid,-1,\"{99FF33}Vettél egy M4 -t. {FF0000}Ára: -4500 \");
return 1;
}
if(listitem == 6)
{
GivePlayerWeapon(playerid, 34, 122);
GivePlayerMoney(playerid, -3300);
SendClientMessage(playerid,-1,\"{99FF33}Vettél egy Snipert. {FF0000}Ára: -3300); \");
return 1;
}
if(listitem == 7)
{
GivePlayerWeapon(playerid, 34, 122);
GivePlayerWeapon(playerid, 31, 800);
GivePlayerWeapon(playerid, 30, 122);
GivePlayerWeapon(playerid, 29, 123);
GivePlayerWeapon(playerid, 25, 100);
GivePlayerWeapon(playerid, 24, 999);
GivePlayerWeapon(playerid, 4, 19999);
GivePlayerMoney(playerid, -20000);
SendClientMessage(playerid,-1,\"{FFFFFF}Vettél {FF0000}egy {99FF33}szett {0000CC}fegyvert {FFFFFF} Ára: -20000 \");
return 1;
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/fegyver\", cmdtext, true, 10) == 0)
{
new string[900];
strcat(string,\"\\t{FFFFFF}Knife {FF0000}- {6500FF}Ára: {FFFFFF}-100 {00FF66}$\\n\");
strcat(string,\"\\t{FFFFFF}Desert Eagle {FF0000}- {6500FF}Ára: {FFFFFF}-1000 {00FF66}$\\n\");
strcat(string,\"\\t{FFFFFF}ShotGun {FF0000}- {6500FF}Ára: {FFFFFF}-2000 {00FF66}$\\n\");
strcat(string,\"\\t{FFFFFF}MP5 {FF0000}- {6500FF}Ára: {FFFFFF}-1500 {00FF66}$\\n\");
strcat(string,\"\\t{FFFFFF}Ak-47 {FF0000}- {6500FF}Ára: {FFFFFF}-4000 {00FF66}$\\n\");
strcat(string,\"\\t{FFFFFF}M4 {FF0000}- {6500FF}Ára: {FFFFFF}-4500 {00FF66}$\\n\");
strcat(string,\"\\t{FFFFFF}Sniper {FF0000}- {6500FF}Ára: {FFFFFF}-3300{00FF66}$\\n\");
strcat(string,\"\\t{FFFFFF}Szett {FF0000}- {6500FF}Ára: {FFFFFF}-20000{00FF66}$\\n\");
ShowPlayerDialog(playerid,DIALOG_fegyver,DIALOG_STYLE_LIST,\"Válasz fegyvert\",string,\"Megvesz\",\"Killép\");
return 1;
}
return 0;
}