Make a cmd that simulates a player is typed another cmd?
#4

I prefer using sscanf.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(drift,5,cmdtext);
    return 0;
}

dcmd_drift(playerid,params[])
{
  new id;
  if(sscanf(params,"i",id)) return SendClientMessage(playerid,-1,"Usage : /drift [id]");
  switch (id)
  {
    case 1 : //Equivalent to /drift1
    case 2 : ///drift2 and so on
  }
  return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)