03.08.2014, 15:36
zcmd has params in it.
You SHOULD NOT use sscanf if you're only using a string.
You SHOULD NOT use sscanf if you're only using a string.
pawn Код:
command(b, playerid, params[])
{
new string[129];
if(isnull(params)) // zcmd has parmas and isnull, use them if you're only going to use a string.
{
SendClientMessage(playerid, WHITE, "SYNTAX: /b [message]");
}
else
{
if(!IsPlayerConnectedEx(playerid))
{
return 1;
}
else
{
if(Player[playerid][PrisonID] == 1)
{
SendClientMessage(playerid, WHITE, "You may not use this channel right now.");
}
else
{
format(string, sizeof(string), "(( %s says: %s )) ", GetName(playerid), params);
NearByMessage(playerid, WHITE, string);
}
}
}
return 1;
}