ITEM NAME
#1

Hello guys.
I have problem with, item name textdraw. When I'm Near Item, TextDraw Is not Showing. I created DEBUG for test, if it was XYZ problem but...
Heres code.
PHP код:
stock invsaxeli(playerid)
{
/*    for(new a = 0; a < 20000; a++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.8, dInvData[a][ObjPos][0], dInvData[a][ObjPos][1], dInvData[a][ObjPos][2]))
        {
            format(saxelasstringi, sizeof(saxelasstringi), "%s", InvNames[dInvData[a][ObjData]]);
             PlayerTextDrawSetString(playerid, DYNAMICINVP[playerid][0], saxelasstringi);
            TextDrawShowForPlayer(playerid, DYNAMICINVG[0]);
            PlayerTextDrawShow(playerid, DYNAMICINVP[playerid][0]);
        }else gaqrobainvsaxeli(playerid);
    }*/
    
new total_vehicles_from_files+1;
    new 
saxelasstringi[1024];
    for(new 
0total_vehicles_from_filesa++)
    {
        if(
IsPlayerInRangeOfPoint(playerid1.8dInvData[a][ObjPos][0], dInvData[a][ObjPos][1], dInvData[a][ObjPos][2]))
        {
            
a;
            
format(saxelasstringisizeof(saxelasstringi), "%s"InvNames[dInvData[f][ObjData]]);
             
PlayerTextDrawSetString(playeridDYNAMICINVP[playerid][0], saxelasstringi);
            
TextDrawShowForPlayer(playeridDYNAMICINVG[0]);
            
PlayerTextDrawShow(playeridDYNAMICINVP[playerid][0]);
            
SendClientMessage(playerid, -1"DEBUG FOR LOOT");
        }else 
gaqrobainvsaxeli(playerid);
    }
    if(
IsPlayerInRangeOfPoint(playerid,3.5,Medikament[GetMedikID(playerid)][xHos],Medikament[GetMedikID(playerid)][yHos],Medikament[GetMedikID(playerid)][zHos]))
    {
        
PlayerTextDrawSetString(playeridDYNAMICINVP[playerid][0], "Medikamentis Yuti");
        
TextDrawShowForPlayer(playeridDYNAMICINVG[0]);
        
PlayerTextDrawShow(playeridDYNAMICINVP[playerid][0]);
    }else 
gaqrobainvsaxeli(playerid);
    return 
1;

P.S Second one (MEDIKAMENT), Its Working too.
Reply
#2

Rewrite your code, it will fix your problem.

PHP код:
            format(saxelasstringisizeof(saxelasstringi), "%s"InvNames[dInvData[f][ObjData]]); 
             
PlayerTextDrawSetString(playeridDYNAMICINVP[playerid][0], saxelasstringi); 
            
TextDrawShowForPlayer(playeridDYNAMICINVG[0]); 
            
PlayerTextDrawShow(playeridDYNAMICINVP[playerid][0]); 
Does this makes any sense?
Reply
#3

Quote:
Originally Posted by ALiScripter
Посмотреть сообщение
Rewrite your code, it will fix your problem.

PHP код:
            format(saxelasstringisizeof(saxelasstringi), "%s"InvNames[dInvData[f][ObjData]]); 
             
PlayerTextDrawSetString(playeridDYNAMICINVP[playerid][0], saxelasstringi); 
            
TextDrawShowForPlayer(playeridDYNAMICINVG[0]); 
            
PlayerTextDrawShow(playeridDYNAMICINVP[playerid][0]); 
Does this makes any sense?
Nope Same
Reply
#4

What do you mean by 'same?', Did you tried rewriting the code?
Reply
#5

Quote:
Originally Posted by ALiScripter
Посмотреть сообщение
What do you mean by 'same?', Did you tried rewriting the code?
I did.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)