20.11.2012, 15:19
@Above users, it's params, not cmdtext. Also, it's not necessary to use sscanf for it. That's why there's 'isnull'.
Last, never use a cell of 256 in client/player message. The limit is only 128.
Last, never use a cell of 256 in client/player message. The limit is only 128.
pawn Код:
#define isnull(%1) \
((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
pawn Код:
CMD:v( playerid, params[ ] )
{
if( playerDB[ playerid ][ vip ] )
{
if( isnull( params ) ) return SendClientMessage( playerid, GREEN, "* Naudojimas: /v [tekstas]" );
new
zin[ 128 ]
;
format( zin, sizeof( zin ), "VIP: %s", params );
SendClientMessageToAll( GREEN, zin );
}
return 1;
}