30.03.2015, 10:55
i made a advertisement command but everytime it keeps on showing the usage no matter if the person is using it in a right way.
pawn Код:
COMMAND:advertisement(playerid, params[])
{
new msg[64], fstr[150];
if(sscanf(params, "s[64]", msg)) return SendClientMessage(playerid, COLOR_ERROR, "[USAGE]: /advertisement [msg]");
if(strlen(msg) < 1 || strlen(msg) > 64) return SendClientMessage(playerid, COLOR_ERROR, "Your ad can only contain 1-64 characters.");
{
format(fstr, sizeof(fstr), "[ADVERT]: %s - [CONTACT]: %s [%d]", msg, PlayerInfo[playerid][pName], playerid);
SendClientMessageToAll(LIGHTGREEN, fstr);
}
return 1;
}
COMMAND:adv(playerid, params[])
{
return cmd_advertisement(playerid, params);
}