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
#2

Why don't you just Compose the Filter Script with your Game Mode?
Reply
#3

That was kind of my last resort, but the more I look at it the less hard it seems to be. I'll give it a shot, but if anyone else can still answer the above question it will be greatly appreciated.
Reply
#4

EDIT: Wait. I will Convert your Thing.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)