Help with Shop area -
Santox14 - 02.11.2011
Hey Forum, i got a Shop System , if i type /shop it opens up a Shop windows (dialogs) where u can buy weapons, but i can open it in the server at every position , i want to make it that when i go to Emmet's and type there /shop that the shop window shows up only there and not at other positions, hope you can help me.
Re: Help with Shop area -
ImprezBart - 02.11.2011
PHP код:
CMD:shop(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid, YOUR_COORDS_HERE))
{
// Show your weapon shop dialog here
}
else return SendClientMessage(playerid, COLOR_LIGHTRED, "You're not in the Gun Store!");
return 1;
}
EDIT: Try this
AW: Help with Shop area -
Santox14 - 02.11.2011
Thanks man , it works !
Re: Help with Shop area -
ImprezBart - 02.11.2011
No problem
AW: Help with Shop area -
Santox14 - 03.11.2011
It compiles fine

, but it dont works Ingame ;( , i can open the shop at every position.. what's wrong?
pawn Код:
CMD:shop(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid, 2441.4575,-1979.1771,13.5469,89.2868 ))
{
ShowPlayerDialog(playerid, ListDialog, DIALOG_STYLE_LIST, "Emmet's Weapon Shop!", "Colt45 200$\nIsrael Uzi 400$\nTec9 400$\nShotgun 200$", "OK", "CANCEL");
}
else return SendClientMessage(playerid, 0xFF000FFF, "You're not at Emmets!");
return 1;
}
AW: Help with Shop area -
Santox14 - 03.11.2011
ok i changed it to this
pawn Код:
CMD:shop(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid, 2441.4575,-1979.1771,13.5469 ))
{
ShowPlayerDialog(playerid, ListDialog, DIALOG_STYLE_LIST, "Emmet's Weapon Shop!", "Colt45 200$\nIsrael Uzi 400$\nTec9 400$\nShotgun 200$", "OK", "CANCEL");
}
else return SendClientMessage(playerid, 0xFF000FFF, "You're not at Emmets!");
return 1;
}
without the
i got this error:
pawn Код:
C:\Users\Josh\Desktop\San Andreas Multiplayer Server\gamemodes\Crimestreetz.pwn(933) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
Can someone help me?
Re: Help with Shop area -
Psymetrix - 03.11.2011
READ and correct the parameters.
Re: Help with Shop area -
ImprezBart - 03.11.2011
PHP код:
CMD:shop(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2441.4575,-1979.1771,13.5469))
{
ShowPlayerDialog(playerid, ListDialog, DIALOG_STYLE_LIST, "Emmet's Weapon Shop!", "Colt45 200$\nIsrael Uzi 400$\nTec9 400$\nShotgun 200$", "OK", "CANCEL");
}
else return SendClientMessage(playerid, 0xFF000FFF, "You're not at Emmets!");
return 1;
}
try this.
AW: Help with Shop area -
Santox14 - 03.11.2011
Dont works IG can open it again at every pos
AW: Help with Shop area -
Santox14 - 03.11.2011
ok it works now !!!!!
i did this
pawn Код:
CMD:shop(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 2441.4575,-1979.1771,13.5469)) return SendClientMessage(playerid, 0xFF000FFF, "You're not at Emmets!");
{
ShowPlayerDialog(playerid, ListDialog, DIALOG_STYLE_LIST, "Emmet's Weapon Shop!", "Colt45 200$\nIsrael Uzi 400$\nTec9 400$\nShotgun 200$", "OK", "CANCEL");
}
return 1;
}