isnull - 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)
+--- Thread: isnull (
/showthread.php?tid=647548)
isnull -
Slavica - 06.01.2018
How to use isnull to make more "complex" commands like /pay [playerid] [amount]
I know I can use scanf but lets stay on isnull topic.
Re: isnull -
RogueDrifter - 06.01.2018
not sure the question is but isnull checks if you entered nothing in the inputtext/cmd text, ex usage is isnull(text) its SORT OF like strlen, you check the length of the text through that although is null just checks if the message is... well null, i never use isnull unless if the text i got i would allow one letter/number in there afaik.
Re: isnull -
Dayrion - 06.01.2018
Well, if you know how to use sscanf, I don't understand why you don't know how can we use isnull.
Anyway, let's take a simple example (including zcmd):
PHP код:
CMD:adminchat(playerid, params[])
{
// check if the player is admin or what ever
if(isnull(params))
return SendClientMessage(playerid, -1, "/a [text]");
// do stuff
}