TD String ain't setting.
#1

As you see - I've created a TD , Made a command to Set it's string - and made that you can reach a location to make it appear. - Each one with it's own ID , and it's own string... But - The problem that , The TD shows WHEN it's empty [You didn't set a string] - But after setting a string , Nothing appear , Here are the codes :

PHP код:
dcmd_setinfoboardstring(playerid, params[])
{
    new 
name[255], id, string[ 256 ];
    if( 
sscanf( params, "ds", id, name))
    {
        if( 
PlayerInfo[playerid][pAdmin] >= 1339)
        {
            
SendClientMessage( playerid, COLOR_WHITE, "USAGE: /setinfoboardstring [infoboardID] [Text]" );
        }
    }
    else
    {
        if( 
PlayerInfo[playerid][pAdmin] >= 1339)
        {
            
format( string, sizeof( string ), "InfoBoards/InfoBoard_%d.ini", id);
            if(!
dini_Exists( string) )
            {
                
SendClientMessage( playerid, COLOR_GREY, "Invalid Info-Board ID!" );
                return 
1;
            }
            else
            {
                new 
IBI[512];
                
format(InfoBoardInfo[id][InfoBoardTDstring], 255, "%s", name);
                
dini_Set(string, "TDstring", InfoBoardInfo[id][InfoBoardTDstring]);
                  
format(IBI,sizeof(IBI), "Information Board\n\n%s", InfoBoardInfo[id][InfoBoardTDstring]);
                
TextDrawSetString(IBITD, IBI);
                
format( string, sizeof( string ), "You have setted the Info-Board (ID: %d) text to %s.", id, name);
                
SendClientMessage( playerid, COLOR_WHITE, string);
                
SaveInfoBoard(id);
            }
        }
    }
    return 
1;
} 
PHP код:
    for(new i = 0; i < sizeof(InfoBoardInfo); i++)
    {
        if(
pickupid == InfoBoardInfo[i][InfoBoardPickupID])
        {
            if(
IsPlayerInRangeOfPoint(playerid, 5.0, InfoBoardInfo[i][InfoBoardX], InfoBoardInfo[i][InfoBoardY], InfoBoardInfo[i][InfoBoardZ]))
               {
                new 
string[128];
                
TextDrawShowForPlayer(playerid, IBI0);
                
TextDrawShowForPlayer(playerid, IBI1);
                
TextDrawShowForPlayer(playerid, IBI2);
                
TextDrawShowForPlayer(playerid, IBI3);
                   
format(string, sizeof(string), "%s", InfoBoardInfo[i][InfoBoardTDstring]);
                
TextDrawShowForPlayer(playerid, IBITD);
                
InfoBoardTimer = SetTimer("HideTDInfo",5000,0);
                return 
1;
            }
        }
    } 
Reply
#2

Bump... 2nd page already..
Reply
#3

Bump - I need urgent help guys.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)