how do i make strcmp params?
#9

What if I wanted like

/setscore [team id] [score]

my two teams are TEAM_HOME and TEAM_AWAY so it would be:

pawn Код:
new tmp[128];
        tmp = strtok(cmdtext,teamid, score);
        if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Usage: /setscore [TEAM ID] [SCORE]");
        if(!gTeam[tmp] == TEAM_HOME || gTeam[tmp] TEAM_AWAY) return SendClientMessage(playerid,-1,"Invalid team id.");
        new id = strval(tmp);
        tmp = strtok(cmdtext,teamid, score);
        if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Usage: /setscore [TEAM ID] [SCORE]");
        teamhomescore = tmp;
        return 1;
??
Reply


Messages In This Thread
how do i make strcmp params? - by (_AcE_) - 01.04.2013, 20:35
Re: how do i make strcmp params? - by [CG]Milito - 01.04.2013, 20:42
Re: how do i make strcmp params? - by Konstantinos - 01.04.2013, 20:45
Re: how do i make strcmp params? - by kamzaf - 01.04.2013, 20:49
Re: how do i make strcmp params? - by (_AcE_) - 01.04.2013, 20:53
Re: how do i make strcmp params? - by zxc1 - 01.04.2013, 20:55
Re: how do i make strcmp params? - by (_AcE_) - 01.04.2013, 21:05
Re: how do i make strcmp params? - by zxc1 - 01.04.2013, 22:22
Re: how do i make strcmp params? - by (_AcE_) - 01.04.2013, 23:30
Re: how do i make strcmp params? - by zxc1 - 02.04.2013, 09:09

Forum Jump:


Users browsing this thread: 1 Guest(s)