30.01.2013, 11:07
Well - It kinda worked to make the TD disappear.. But when I set the TD text - The TD doesn't appear anymore :/
PHP Code:
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;
}