Dialog on checkpoint doesn't show up +rep
#1

Hello,

I am trying to do a bank system using checkpoint, the checkpoint apear but once im getting into it the dialog doesn't want to show up... what's wrong ?

Here my code:

pawn Код:
new Bank;
pawn Код:
public OnPlayerSpawn(playerid)
{
    Bank = CreateDynamicCP(-227.6468, 2605.7734 , 62.7031, -1, -1, -1, -1, 100);
    if(PosX[playerid] !=0 && PosY[playerid] !=0 && PosZ[playerid] !=0 && Angle[playerid] != 0)
    {
        SetPlayerPos(playerid,PosX[playerid],PosY[playerid],PosZ[playerid]);
        SetPlayerFacingAngle(playerid,Angle[playerid]);
        SetPlayerInterior(playerid,Interior[playerid]);
        SetPlayerVirtualWorld(playerid,VirtualWorld[playerid]);
    }
    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
    return 1;
}
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == Bank)
    {
        if(IsPlayerInRangeOfPoint(playerid,10.0,-227.6468, 2605.7734 , 62.7031))
        {
            ShowPlayerDialog(playerid,DIALOG_BANK,DIALOG_STYLE_LIST,""COL_BLUE"Downtown Roleplay bank system","Deposit\nWithdraw","Choose","Cancel");
        }
    }
}

Thanks in advance.
Reply
#2

Why dont you use it with a SetPlayerCheckpoint and then use it under OnPlayerEnterCheckpoint. Try to show the dialog then! Hope it helps.

- BMiaa
Reply
#3

For some reason DynamicCP is working now... thanks for trying to help me . Thread close !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)