Ban Bug?
#1

Cant get it working, if i write "/banme Invalid Reason"

It gets: "[NWA]Hannes has banned himself! Reason:"

The reason doesnt show

Heres my code
pawn Код:
dcmd_banme(playerid,params[])
{
    new str[128], BannedName[24];
    GetPlayerName(playerid, BannedName, 24);
    format(str, 128, "%s has banned himself! Reason: %s", BannedName, strval(params));
    SendClientMessageToAll(red, str);
    Ban(playerid);
    return 1;
}
Reply
#2

You cannot use strval. Use sscanf. If you don't know what sscanf is, search on the wiki. You will find: 1. The sscanf code and 2. a very nice tutorial about how to use it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)