Advertisement
ZumeZero

TextDrawSetStringEx

Jan 31st, 2015
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.57 KB | None | 0 0
  1. stock TextDrawSetStringEx(Text:ID, str[], {Float,_}:...)
  2. {
  3.     static
  4.         args,
  5.         start,
  6.         end,
  7.         string[1024]
  8.     ;
  9.     #emit LOAD.S.pri 8
  10.     #emit STOR.pri args
  11.  
  12.     if (args > 12)
  13.     {
  14.         #emit ADDR.pri str
  15.         #emit STOR.pri start
  16.  
  17.         for (end = start + (args - 12); end > start; end -= 4)
  18.         {
  19.             #emit LREF.pri end
  20.             #emit PUSH.pri
  21.         }
  22.         #emit PUSH.S str
  23.         #emit PUSH.C 1024
  24.         #emit PUSH.C string
  25.         #emit PUSH.C args
  26.         #emit SYSREQ.C format
  27.  
  28.         TextDrawSetString(ID, string);
  29.  
  30.         #emit LCTRL 5
  31.         #emit SCTRL 4
  32.         #emit RETN
  33.     }
  34.     return TextDrawSetString(ID, str);
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement