#1

Well i am trying to make this command to send messages to players but i want it to show the msg that i type in and i wanna be sure this is correct i dont think it is
So please fix it if it is wrong or please tell me what to do

Код:
CMD:automsg(playerid, params[])
{
	new Msg[80];
	if(sscanf(params, "c[80]",Msg))
	{
    	return SendClientMessage(playerid, 0xFF0000AA, "Usage: /automsg [msg]");
	}
        format(Msg, sizeof(Msg), "{08FF8C}XR-RP:[BOT]{FF8000}.",Msg);
	SendClientMessageToAll(playerid,COLOR_ORANGE,Msg);
	return 1;
}
Reply
#2

pawn Код:
CMD:automsg(playerid, params[])
{
new Msg[80];
if(sscanf(params, "s[80]",Msg)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /automsg <text>");
format(Msg, sizeof(Msg), "{08FF8C}XR-RP:[BOT]{FF8000} %s."
SendClientMessageToAll(COLOR_ORANGE,Msg);
return 1;
}
Reply
#3

Quote:

format(Msg, sizeof(Msg), "{08FF8C}XR-RP:[BOT]{FF8000}.",Msg);

You sure there is no %s inside?
Reply
#4

I think it shoult!
Reply
#5

pawn Код:
CMD:automsg(playerid, params[])
{
    if(!isnull(params))
    {
        new str[128];
        format(str, sizeof(str), "{08FF8C}XR-RP:[BOT]{FF8000} %s.", params);
        SendClientMessageToAll(COLOR_ORANGE, str);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)