Help me with MySQL and Incognito Streamer please
#1

1. Challenge: write a function that prints the nick-name the player with the specified ID account.
On Russian-language forum thread we've come to this conclusion:
PHP код:
stock OfflineNameID 

    new 
query[256], name[24]; 
    
format(querysizeof(query), "SELECT `nick` FROM `players` WHERE `ID` = '%d'"ID); 
    new 
Cache:queryname mysql_query(chandlequery); 
    if ( 
cache_num_rows() ) {
         
cache_get_field_content(0"nick"name);
    }
    else {
         
format (name24"None") ;
    }
    
cache_delete(queryname);
    return 
name

But this function displays the nick-name player only when first using it:
https://www.dropbox.com/s/14hisz23cr...2019.20.34.png
https://www.dropbox.com/s/w9uiilr8bm...2019.19.57.png
PHP код:
if(HouseInfo[id][hOwner] == 0)
{
    
HouseInfo[id][hPickup] = CreatePickup(127323HouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ], 0);
    
HouseInfo[id][hMapIcon] = CreateDynamicMapIcon(HouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ], 311);
    
format(stringsizeof(string), "Price: {FFFFFF}$%d"HouseInfo[id][hPrice]);
    
HouseInfo[id][hLabel] = CreateDynamic3DTextLabel(string0xFF7400FFHouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ], 20.0INVALID_PLAYER_IDINVALID_VEHICLE_ID1, -1, -1, -120.0);
}
else
{
    
HouseInfo[id][hPickup] = CreatePickup(131423HouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ], 0);
    
format(stringsizeof(string), "Owner: {FFFFFF}%s"OfflineName(HouseInfo[id][hOwner]));
    
HouseInfo[id][hLabel] = CreateDynamic3DTextLabel(string0xFF7400FFHouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ], 20.0INVALID_PLAYER_IDINVALID_VEHICLE_ID1, -1, -1, -120.0);

What's wrong?

2. Challenge: Attach 3D text on vehicle (Incognito Streamer).

PHP код:
new Float:P[4];
GetPlayerPos(playeridP[0], P[1], P[2]);
GetPlayerFacingAngle(playeridP[3]);
CarInfo[LastVehicle][CarServerID] = CreateVehicle(params[2], P[0], P[1], P[2], P[3], random(125), random(125), 360);
format(stringsizeof(string), "Model: {B6FF00}%s\n{FFFFFF}Price: {B6FF00}$%d"GetVehicleName[params[2]-400], params[1]);
CarInfo[LastVehicle][CarLabel] = CreateDynamic3DTextLabel(string0xFFFFFFFFP[0], P[1], P[2], 25.0INVALID_PLAYER_IDCarInfo[LastVehicle][CarServerID], 0, -1, -1, -125.0); 
The machine ID in the variable is written correctly, but the 3D text en is created. In what could be the problem?
https://www.dropbox.com/s/907axoi9wifhiq3/sa-mp-015.png

Sry for bad English.
Reply
#2

bump
Reply
#3

bump
Reply
#4

bump
Reply
#5

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)