22.01.2014, 15:42
i made stores and when i try to buy them there is a bug it shows the dialog and when i click at buy nothing wont happend ... can anyone knows how to fix this
check the photos to see the bug
check the photos to see the bug
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
for(new i = 0;i<MAX_BUSS;i++)
{
if(checkpointid == BusinessInfo[i][CP])
{
cpid[playerid] = i;
format(file,sizeof(file),"Business/%i.ini",i);
if(dini_Int(file, "HasOwner") == 0)
{
ShowPlayerDialog(playerid,219,DIALOG_STYLE_MSGBOX,"Buy Business","Do you want to buy this businesses?","Buy","Cancel");
}
else
{
SetPlayerPos(playerid, -25.132598,-139.066986,1003.546875);
SetPlayerInterior(playerid, 16);
SetPlayerVirtualWorld(playerid, i);
SetPlayerFacingAngle(playerid, 359.9003);
}
}
}
if(checkpointid == BizExit)
{
format(file, sizeof(file), "Business/%i.ini", GetPlayerVirtualWorld(playerid));
SetPlayerPos(playerid, dini_Float(file, "SpawnOutX"), dini_Float(file, "SpawnOutY"), dini_Float(file, "BusZ"));
SetPlayerFacingAngle(playerid, dini_Float(file, "A"));
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
return 1;
}