14.03.2014, 04:47
I have made this script here and I have a problem with it. It works great but it doesn't show me "Go to Ammunation entrace if you wish to buy guns." when i'm far away, this only shows after i type /wlist once i'm already near Ammunation.. I've been trying to figure it out for some hour now.
What's missing?
What's missing?
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/wlist"))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1367.9517,-1279.9250,13.5469))
{
SendClientMessage(playerid,0xFFFFFFFF,"Go to Ammunation entrace if you wish to buy guns.");
ShowPlayerDialog(playerid, 67, DIALOG_STYLE_LIST, "Weapon shop", "Armour - 7000$\nChainsaw - 50000$\nGrenade - 7500$\nMolotov Cocktail - 5500$\nDesert Eagle - 8500$\nSawnoff Shotgun - 10000$\nCombat Shotgun - 8000$\nUzi - 5000$\nTec-9 - 5000$\nMP5 - 7000$\nM4A1 - 15000$\nAK47 - 13000$\nSniper Rifle - 20000$\nRPG - 350000$\nFlamethower - 250000$\nSatchel Charge - 150000$\nFire Extinguisher - 10000$\nThermal Goggles - 5000$\nParachute - 1000$\nHealth - 5000$", "Buy", "Cancel");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 67)
{
if(!response)
return 1;
switch(listitem)
{