HELP PLEASE T_T
#4

hmm.....
1.: YCMD : https://sampforum.blast.hk/showthread.php?tid=169029 + tutorial
example command
pawn Код:
YCMD:me(playerid, params[], help)
{
    if (help)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Sends an action to other players.");
    }
    else
    {
        new
            str[128];
        if (isnull(params))
        {
            format(str, sizeof (str), "Usage: \"/%s [action]\"", Command_GetDisplayNamed("me", playerid));
            SendClientMessage(playerid, 0xFF0000AA, str);
        }
        else
        {
            GetPlayerName(playerid, str, sizeof (str));
            format(str, sizeof (str), "* %s %s", str, params);
            SendClientMessageToAll(0xFF0000AA, str);
        }
    }
    return 1;
}
sscanf Link: https://sampforum.blast.hk/showthread.php?tid=120356
learn it and you will know how to make easily a command for example in sscanf

pawn Код:
if(sscanf(params,"ud",id,ammount) ) return SendClientMessage(playerid,COLOR_RED,"Use /givegun [id] [ammount]");
How you can see u = Player ID/Name and ammount ( d) is an integrer ) = number ( ex: 42)
more easily than new tmp[256]; etc... sscanf >(faster than) strtok
Reply


Messages In This Thread
HELP PLEASE T_T - by bodey3333 - 22.07.2012, 18:39
Re: HELP PLEASE T_T - by djjavi0 - 22.07.2012, 18:57
Re: HELP PLEASE T_T - by bodey3333 - 22.07.2012, 19:07
Re: HELP PLEASE T_T - by XStormiest - 22.07.2012, 19:20

Forum Jump:


Users browsing this thread: 2 Guest(s)