strtok to dcmd?
#1

I am trying to add a betting system to Yagu's Race Filterscript. He has written his commands in the dcmd format, which put simply, confuses me. I have written the command in my GM as strtok, hoping that it would identify when a player became a race participant through the filterscript....it did not.

So my question is, could somebody transpose this command below into dcmd format? Or am I asking a ridiculous question that makes absolutely no sense?

Or even, is there a way to link my gamemode and this filterscript through pawno?

pawn Код:
if(strcmp(cmd, "/racers", true) == 0) {
  if(IsSpawned[playerid] == 0) {
    SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
  return 1;
  }
  new raceresult =0;
  for(new i=0;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i) && RaceParticipant[i] >= 1)
    {
    raceresult ++;
    new raceename[30];
    GetPlayerName(i,raceename,30);
  format(string, sizeof(string), "%s(%d) is scheduled to race, use /betrace (id) (amt) to place a bet on this player",raceename,i,RaceParticipant[i]);
    SendClientMessage(playerid, 0x00C7FFAA, string);
    }
    }
  if(raceresult == 0) {
    SendClientMessage(playerid, 0x00C7FFAA, "There is no one signed up to race right now.");
    }
    return 1;
  }

Reply


Messages In This Thread
strtok to dcmd? - by Rhemsis - 28.06.2009, 21:08
Re: strtok to dcmd? - by refshal - 28.06.2009, 21:16
Re: strtok to dcmd? - by Rhemsis - 28.06.2009, 21:19
Re: strtok to dcmd? - by refshal - 28.06.2009, 21:21

Forum Jump:


Users browsing this thread: 3 Guest(s)