Random messages with %s
#1

Gosh, I can't believe I need help with this.

I want random messages that have one string inserted in to them, which will be a random player's name - I am making my NPCs say random shit every few minutes. For example

pawn Код:
new npc_phrases[][] = {
"Blah Blah Blah %s.",
"Hello %s.",
"%s sucks."
};

// Then doing

format(text_to_send, sizeof(), "%s", npc_phrases[whatever], playername);
But it doesn't work, and just prints '%s' without the substitution.
Reply


Messages In This Thread
Random messages with %s - by MP2 - 02.04.2012, 02:36
Re: Random messages with %s - by DarkScripter - 02.04.2012, 03:23
Re: Random messages with %s - by [ABK]Antonio - 02.04.2012, 03:27
Re: Random messages with %s - by [HiC]TheKiller - 02.04.2012, 03:38
Re: Random messages with %s - by MP2 - 02.04.2012, 03:43

Forum Jump:


Users browsing this thread: 1 Guest(s)