Ban Bug? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Ban Bug? (
/showthread.php?tid=179164)
Ban Bug? -
[NWA]Hannes - 25.09.2010
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;
}
Re: Ban Bug? -
DeathOnaStick - 25.09.2010
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.