why doesnt this work?
#1

Код:
CMD:ad(playerid, params[])
{
	new string[128];
	if(sscanf(params,"s",params)) return SendClientMessage(playerid, red, "USAGE:/ad [msg]");
	format(string, 128, "((%s)) %s", oname[playerid], params);
	SendClientMessageToAll(ocolour[playerid], string);
	return 1;
}
argument type mismatch (argument 1) at SendClientMessage line
Reply
#2

What's the "ocolour[playerid]"? You store color in that or...?
Reply
#3

You want this?
pawn Код:
CMD:ad(playerid, params[])
{
    new string[128], PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
    if(sscanf(params,"s",params)) return SendClientMessage(playerid, red, "USAGE:/ad [msg]");
    format(string, 128, "((%s)) %s", PlayerName, params);
    SendClientMessageToAll(-1, string);
    return 1;
}
Reply
#4

Try putting a s[128] in the sscanf line.
Reply
#5

Quote:
Originally Posted by Hayden_Bruin
Посмотреть сообщение
Try putting a s[128] in the sscanf line.
When you use sscanf + ZCMD + params[] - I think you don't need to declare size of the string?

Maybe there's a problem with it's color in SendClientMessageToAll.
Reply
#6

yes i stored a hex code in ocolour but it gives me an error
Reply
#7

show us the error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)