SA-MP Forums Archive
dynamic(cp) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: dynamic(cp) (/showthread.php?tid=200732)



dynamic(cp) - Blatnoi - 19.12.2010

Hello i'm trying to create bank menu via dialog + cp
basically i have done everything but i have 1 little problem

it works only if there is 1 person on the server ...
if there is more then one dialog menu doesn't show up but cp does
pawn Код:
bank = CreateDynamicCP( 2308.7785, -13.4947, 26.7421, 1.50, -1, -1, -1, 40.0);
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == bank)
    {
ShowPlayerDialog( playerid, bankdialog, DIALOG_STYLE_LIST,"BankMenu", "Balance\nDeposit\nWithdraw\nSell Gold", "Select", "Cancel" );

    }
}



Re: dynamic(cp) - Tee - 19.12.2010

I use it the way you do but this is how i do it:

pawn Код:
bank = CreateDynamicCP( 2308.7785, -13.4947, 26.7421, 1.50, -1, -1, -1, 40.0);
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == bank)
    {
        if(IsPlayerInRangeOfPoint(playerid,10.0,2308.7785, -13.4947, 26.7421))
        ShowPlayerDialog( playerid, bankdialog, DIALOG_STYLE_LIST,"BankMenu", "Balance\nDeposit\nWithdraw\nSell Gold", "Select", "Cancel" );

    }
}
I use IsPlayerInRangeOfPoint.


Re: dynamic(cp) - Blatnoi - 19.12.2010

Tee
Yep i was also thinking about IsPlayerInRangeOfPoint
but that way OnPlayerEnterDynamicCP and if(checkpointid == bank) are useless
you can just put it OnPlayerUpdate
---------------
i'm curious am i doing something wrong or is this function buged ?


Re: dynamic(cp) - Blatnoi - 19.12.2010

bump ....
any ideas?
when i use IsPlayerInRangeOfPoint, dialog starts poping up again and again... i can't more or exit it
i could set teleport on response 2 thought but it wont be best idea


Re: dynamic(cp) - Blatnoi - 20.12.2010

UP...