How to make command with two string arguments?
#3

Check the link below, I suggest you use it.
Link: https://sampforum.blast.hk/showthread.php?tid=120356

Here's an example:
pawn Код:
command(words, playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new string[128], word[2][32];
        if(sscanf(params, "s[32]s[32]", word[0], word[1])) return SendClientMessage(playerid, -1, "Usage: /words <word1> <word2>");
        if(!strlen(word[0]) || !strlen(word[1])) return SendClientMessage(playerid, -1, "No words typed!");
       
        format(string, sizeof(string), "Your words are: %s and %s.", word[0], word[1]);
        SendClientMessage(playerid, -1, string);
    }
    return 1;
}
Is that what you're trying to do?
Reply


Messages In This Thread
How to make command with two string arguments? - by Micius - 07.08.2013, 09:04
Re: How to make command with two string arguments? - by DemCaribous - 07.08.2013, 09:07
Re: How to make command with two string arguments? - by Skribblez - 07.08.2013, 09:15
Re: How to make command with two string arguments? - by Youarex - 07.08.2013, 09:26
Re: How to make command with two string arguments? - by Micius - 07.08.2013, 09:28

Forum Jump:


Users browsing this thread: 2 Guest(s)