a weird problem..
#1

PHP код:
iBizTryEnter(playerid) {
    for(new 
i=0;i<MAX_ILLEGAL_BIZ;i++) {
        if(
IllegalBusinesses[i][EIllegalBiz_SQLID] != 0) {
            new 
interior IllegalBusinesses[i][EIllegalBiz_Interior];
            if(
IsPlayerInRangeOfPoint(playerid,1.5,IllegalBusinesses[i][EIllegalBiz_X], IllegalBusinesses[i][EIllegalBiz_Y], IllegalBusinesses[i][EIllegalBiz_Z])) {
                if(
IllegalBusinesses[i][EIllegalBiz_Closed] == 0) {
                    
HintMessage(playeridCOLOR_LIGHTGREEN"(( Do /buy to buy things ))");
                    
SetPlayerPos(playeridIBInteriors[interior][EIBX],IBInteriors[interior][EIBY],IBInteriors[interior][EIBZ]);
                    
SetPlayerInterior(playeridIBInteriors[interior][EIBInterior]);
                    
SetPlayerVirtualWorld(playeridIllegalBusinesses[i][EIllegalBiz_SQLID]+25000);
                    
SetPlayerFacingAngle(playeridIBInteriors[interior][EIBAngle]);
                }
            } else if(
IsPlayerInRangeOfPoint(playerid,1.5,IBInteriors[interior][EIBX],IBInteriors[interior][EIBY],IBInteriors[interior][EIBZ])) {
                if(
GetPlayerVirtualWorld(playerid) == IllegalBusinesses[i][EIllegalBiz_SQLID]+25000) {
                    
SetPlayerPos(playeridIllegalBusinesses[i][EIllegalBiz_X], IllegalBusinesses[i][EIllegalBiz_Y], IllegalBusinesses[i][EIllegalBiz_Z]);
                    
SetPlayerInterior(playerid0);
                    
SetPlayerVirtualWorld(playerid0);
                }
            }
        }
    }

PHP код:
getIBizInside(playeridFloat:range 150.0) {
    for(new 
i=0;i<MAX_ILLEGAL_BIZ;i++) {
        if(
IllegalBusinesses[i][EIllegalBiz_SQLID] != 0) {
            new 
interior IllegalBusinesses[i][EIllegalBiz_Interior];
            if(
IsPlayerInRangeOfPoint(playerid,range,IBInteriors[interior][EIBX],IBInteriors[interior][EIBY],IBInteriors[interior][EIBZ])) {
                if(
GetPlayerVirtualWorld(playerid) == IllegalBusinesses[i][EIllegalBiz_SQLID]+25000) {
                    return 
i;
                }
            }
        }
    }
    return -
1;

PHP код:
enum EIllegalBizInteriors {
    
Float:EIBX,
    
Float:EIBY,
    
Float:EIBZ,
    
Float:EIBAngle,
    
EIBInterior,
    
EIBName[32],
    
EIBPrice,
};
new 
IBInteriors[][EIllegalBizInteriors] = {{422.5718382536.54150310.00000086.27410110"Small House"500000}}; 
The problem is that.. when creating illegal biz.. it creates a biz and then saves it MYSQL aswell.. but when I press the Enter key to enter the businesss it doesn't set my pos to the interior... it just doesn't work and shows that (( /buy to buy things )) only.. but it doesn't set my position to that interior..?
Reply
#2

Show loading code. Use prints to get current state of data.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)