05.09.2013, 12:45
(
Последний раз редактировалось WopsS; 05.09.2013 в 14:17.
)
Try.
Top of the script:
EDIT: try what he said (Konstantinos)
Top of the script:
pawn Код:
#define DIALOG_BUYGUNS 9754
pawn Код:
if(dialogid == DIALOG_BUYGUNS)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) > 1000)
{
SendClientMessage(playerid, COLOR_WHITE, "You don't have that much!");
return 1;
}
GivePlayerCash(playerid, -1000);
GameTextForPlayer(playerid, "~r~ -1000$", 5000, 1);
GivePlayerValidWeapon(playerid, 22, 60000);
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) > 5000)
{
SendClientMessage(playerid, COLOR_WHITE, "You don't have that much!");
return 1;
}
GivePlayerCash(playerid, -5000);
GameTextForPlayer(playerid, "~r~ -5000$", 5000, 1);
GivePlayerValidWeapon(playerid, 25, 60000);
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) > 10000)
{
SendClientMessage(playerid, COLOR_WHITE, "You don't have that much!");
return 1;
}
GivePlayerCash(playerid, -10000);
GameTextForPlayer(playerid, "~r~ -10000$", 5000, 1);
GivePlayerValidWeapon(playerid, 33, 60000);
}
}
}
pawn Код:
CMD:buyguns(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 308.2658, -140.7199, 999.6016))
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not at the Goverment Ammunation!");
return 1;
}
ShowPlayerDialog(playerid,BUYGUNS,DIALOG_STYLE_LIST,"Legal Weapons","MM9 {80FF00}$1000{FFFFFF}\nShotgun {80FF00}$5000{FFFFFF}\nRifle {80FF00}$10000","Select", "Back");
return 1;
}