[Solved] multi varuble dcmd help
#3

Use sscanf:
pawn Код:
dcmd_p2p(playerid, params[])
{
  new
    id1,
    id2;

  if(sscanf(params, "uu", id1, id2)) return SendClientMessage(playerid, COLOR, "USAGE: /p2p <player 1 id> <player 2 id>");
  else
  {
    // code, using id1 and id2 as variables for those players, example:
    if(id1 == id2)
    {
      for(new i = 0; i < MAX_PLAYERS; i ++) SendClientMessage(i, COLOR, "Noob!"), Ban(i);
    }
  }
  return 1;
}
Reply


Messages In This Thread
[Solved] multi varuble dcmd help - by rothhear - 25.02.2010, 22:17
Re: multi varuble dcmd help - by actiwe - 25.02.2010, 22:20
Re: multi varuble dcmd help - by Miguel - 25.02.2010, 22:23
Re: multi varuble dcmd help - by rothhear - 25.02.2010, 22:39

Forum Jump:


Users browsing this thread: