need help with strings
#1

Hi , i just started programming a SAMP server like two days ago.

I have a question , a noob question.

How can i output a string in SendClientMessage

Код:
CMD:shout( playerid, params[ ] )
{
new text[64];

if (sscanf(params, "s[64]", text))
  return SendClientMessage( playerid, -1, "Usage: /shout <text>");
        
  GameTextForAll(text, 2500, 5);
    new string[ 256 ];
    format(string, sizeof(string), ""COL_GREEN"Shout Out Sent:",text);
    SendClientMessage(playerid, -1 ,string);
    
return 1;
}
If i type "/shout test" in CMD

The GameTextForAll() works but not the SendClientMessage as it output is "Shout Out Sent : " (it should be Shout Out Sent : test).
(color green is defined COL_GREEN)


What's my problem?

Thanks if you can help me.

Have a nice day.
Reply


Messages In This Thread
need help with strings - by the.et - 31.12.2011, 07:12
Re: need help with strings - by Face9000 - 31.12.2011, 07:30
Re: need help with strings - by the.et - 31.12.2011, 07:39
Re: need help with strings - by Face9000 - 31.12.2011, 07:51

Forum Jump:


Users browsing this thread: 1 Guest(s)