Misiur

Untitled

Feb 19th, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.62 KB | None | 0 0
  1. #include <a_samp>
  2. #include <YSI\y_va>
  3.  
  4. main() {
  5.     new
  6.         resultHolder[128];
  7.  
  8.     format(resultHolder, sizeof resultHolder, "");
  9.  
  10.     Fine(resultHolder, sizeof resultHolder, "Hello %s %s %s", "World", "of", "pain");
  11.     printf("Fine: %s", resultHolder);
  12.     NotFine(resultHolder, sizeof resultHolder, "Hello %s %s %s", "World", "of", "pain");
  13.     printf("NotFine: %s", resultHolder);
  14. }
  15.  
  16. Fine(out[], size, const fmt[], va_args<>) {
  17.     va_format(out, size, fmt, va_start<3>);
  18. }
  19. NotFine(out[], size, const fmt[], va_args<>) {
  20.     new
  21.         killer[128];
  22.  
  23.     va_format(killer, sizeof killer, fmt, va_start<3>);
  24.  
  25.     #pragma unused out, size
  26. }
Advertisement
Add Comment
Please, Sign In to add comment