SA-MP Forums Archive
Create object does not create the actual object - 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)
+--- Thread: Create object does not create the actual object (/showthread.php?tid=619562)



Create object does not create the actual object - TheDarkBlade - 19.10.2016

PHP код:
forward LoadGates();
public 
LoadGates()
{
    
housess cache_num_rows();
    for(new 
1<= housessi++)
    {
        if(
HouseInfo[i][hGate] == 1)
        {
            
printf("%d %f %f %f %f %f %f",i,HouseInfo[i][hGx],HouseInfo[i][hGy],HouseInfo[i][hGz],HouseInfo[i][hGRx],HouseInfo[i][hGRy],HouseInfo[i][hGRz]);
            
Gate[i] = CreateObject(980,HouseInfo[i][hGx],HouseInfo[i][hGy],HouseInfo[i][hGz],HouseInfo[i][hGRx],HouseInfo[i][hGRy],HouseInfo[i][hGRz],500.00 );
        }
    }
    return 
1;

PHP код:
    mysql_format(SQLquerysizeof(query), "SELECT * FROM `houses`");
    
mysql_tquery(SQLquery"LoadGates"""); 
In the server console i get the correct cords but the object is not created


Re: Create object does not create the actual object - ThatFag - 19.10.2016

Tried to create as a Dynamic object ?


Re: Create object does not create the actual object - TheDarkBlade - 19.10.2016

i did , and the same result


Re: Create object does not create the actual object - TheDarkBlade - 19.10.2016

any replay ?


Re: Create object does not create the actual object - TheDarkBlade - 19.10.2016

bump


Re: Create object does not create the actual object - Airblog - 19.10.2016

Does it create any object or it doesn't at all
If it doesn't check in database to see hGate for each house is 1 or not if it is check HouseInfo[i][hGate] is 1 you can check those with print("it worked");
Just put it under if(HouseInfo[i][hGate] ==1)