ID / Part of Name on Commands written with ZCMD and sscanf.
#4

Quote:
Originally Posted by PrivatioBoni
Посмотреть сообщение
I can confirm that this will act both as an ID and part of a name/full name.
It will not use part of name unless you define this previous to the 'u' specifier: ?<MATCH_NAME_PARTIAL=1>

pawn Код:
if (sscanf(params, "?<MATCH_NAME_PARTIAL=1>u", target)) return ...
https://sampforum.blast.hk/showthread.php?tid=120356


Alternatively you can use

SSCANF_Option(MATCH_NAME_PARTIAL, 1);

Quote:

MATCH_NAME_PARTIAL:

Currently sscanf will search for players by name, and will ALWAYS search for player whose name STARTS with the specified string. If you have, say "[CLAN]******" connected and someone types "******", sscanf will not find "[CLAN]******" because there name doesn't start with the specified name. This option, when set to 1, will search ANYWHERE in the player's name for the given string.

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)