17.02.2011, 09:48
An even more odd use. This is a replacement for my old Text_Send function from YSI 0.1. In that version there were multiple functions for sending to different people with and without formatting, in this version I think I've improved it vastly. Note that now you have a default text set in a file directly linked to that file, but you can use others. Also note that the identifiers are no longer strings:
That code will detect when a player is using the "GROUP->TEXT" format and actually get rid of the call to the file default variable. If they are not using that format then nothing will happen at all. This makes the format of _Text_Send:
But because it's wrapped up in a nice macro, you don't ever need to know half the parameters even exist.
Possible uses:
pawn Code:
#define Text_Send(%0,%1) PSF(_Text_Send,%0,YSI_gDefaultText,#%1)
#define _Text_Send(%0,YSI_gDefaultText,#%1->%2) _Text_Send(%0,#%1,#%2)
pawn Code:
_Text_Send(PlayerSet<playerid>, const group[], const text[], {Float,_}:...)
Possible uses:
Code:
Text_Send(playerid, TEXT_NO_RACE); Text_Send(admingroup, RACE_TEXT -> TEXT_NO_RACE); Text_Send(someArrayOfPlayers, TEXT_STARTING_RACE, 5);