isnull
#1

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.
Reply
#2

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.
Reply
#3

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(playeridparams[])
{
    
// check if the player is admin or what ever
    
if(isnull(params))
        return 
SendClientMessage(playerid, -1"/a [text]");
    
// do stuff

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)