Help with Shop area
#1

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.
Reply
#2

PHP код:
CMD:shop(playeridparams[])
{
    if(!
IsPlayerInRangeOfPoint(playeridYOUR_COORDS_HERE))
    {
        
// Show your weapon shop dialog here
    
}
    else return 
SendClientMessage(playeridCOLOR_LIGHTRED"You're not in the Gun Store!");
    return 
1;

EDIT: Try this
Reply
#3

Thanks man , it works !
Reply
#4

No problem
Reply
#5

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;
}
Reply
#6

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
pawn Код:
89.2868
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?
Reply
#7

READ and correct the parameters.
Reply
#8

PHP код:
CMD:shop(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid7.02441.4575,-1979.1771,13.5469))
    {
        
ShowPlayerDialog(playeridListDialogDIALOG_STYLE_LIST"Emmet's Weapon Shop!""Colt45 200$\nIsrael Uzi 400$\nTec9 400$\nShotgun 200$""OK""CANCEL");
    }
    else return 
SendClientMessage(playerid0xFF000FFF"You're not at Emmets!");
    return 
1;

try this.
Reply
#9

Dont works IG can open it again at every pos
Reply
#10

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)