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

Let me demonstrate...

pawn Код:
CMD:pm(playerid, params[])
{
    new target, message[150];
    if(sscanf(params, "us[150]", target, message)) return SendClientMessage(playerid, -1, "USAGE: /pm [playerid/partofname] [message]");
What the guy above me said is really only needed for a database search, for example an MDC.

by doing it his way, if I wanted to PM someone named John_Smith I can do /pm smith, but this way requires to do /pm john. My way is how most servers do it
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)