View Single Post
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 05-24-2017 , 15:17   Re: Looks like Valve added a truly dynamic text entity in the new CS:GO update
Reply With Quote #8

This one has color and rotation support. Keep in mind the text is NOT centered. The First char stars where you teleport it!

PHP Code:
stock int Point_WorldText(float fPos[3], float fAngles[3], char[] sText "Source 2 Engine?"iSize 10,  int r 255int g 255int b 255any ...)
{
    
int iEntity CreateEntityByName("point_worldtext");
    
    if(
iEntity == -1)
        return 
iEntity;
    
    
char sBuffer[512];
    
VFormat(sBuffersizeof(sBuffer), sText8);
    
DispatchKeyValue(iEntity,     "message"sBuffer);
    
    
char sSize[4];
    
IntToString(iSizesSizesizeof(sSize));
    
DispatchKeyValue(iEntity,     "textsize"sSize);
    
    
char sColor[11];
    
Format(sColorsizeof(sColor), "%d %d %d"rgb);
    
DispatchKeyValue(iEntity,     "color"sColor);
    
    
TeleportEntity(iEntityfPosfAnglesNULL_VECTOR);
    
    return 
iEntity;

__________________

Last edited by zipcore; 05-24-2017 at 15:24.
zipcore is offline