11.03.2012, 19:13
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:
Thanks in advance.
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.