How to check if params are empty? - 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: How to check if params are empty? (
/showthread.php?tid=315725)
How to check if params are empty? -
Shabi RoxX - 04.02.2012
Hy guys in zcmd , how i can check if default param is empty/null
Like Here?
CMD

oc(playerid,params[])
{
//If(Null

?(params))
}
Re: How to check if params are empty? -
MasterJoker - 04.02.2012
pawn Код:
if(isnull(params)) return //message here or other function
Re: How to check if params are empty? -
Konstantinos - 04.02.2012
Yes, you can
pawn Код:
CMD:ooc( playerid, params[ ] )
{
if( isnull( params ) ) return SendClientMessage( ... )
// Code
return 1;
}
OR
pawn Код:
CMD:ooc( playerid, params[ ] )
{
if( !isnull( params ) )
{
// Code
}
else SendClientMessage( .. );
return 1;
}
Re: How to check if params are empty? -
Shabi RoxX - 04.02.2012
thanks...