[Solved]Whats wrong with my pilot chat?
#5

Please try to remake my command from the code i gave you.
pawn Код:
//At Top
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

//The Command
dcmd_p(playerid,params[])
{
  new vehicleid;
  if(strlen(params) == 0) return SendClientMessage(playerid, red, "Usage: /p (Text)");
  for (new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i) || !IsPlayerInAnyVehicle(i)) continue;
    vehicleid = GetPlayerVehicleID(i);
    switch(GetVehicleModel(vehicleid))
    {
      case 417 ,425, 447, 592, 577, 511, 512,
      593, 520, 553, 476, 519, 460, 513, 548,
      487, 488, 497, 563, 469:
      {
        new string[128];
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string,sizeof(string),"Pilot Chat: %s: %s",pName, params);
        SendClientMessage(i, green, string);
      }
    }
    return 1;
  }
  return 1;
}

//At OnPlayerCommandText
dcmd(p,1,cmdtext);
Reply


Messages In This Thread
[Solved]Whats wrong with my pilot chat? - by bajskorv123 - 13.02.2010, 22:27
Re: Whats wrong with my pilot chat? - by Fedee! - 13.02.2010, 23:04
Re: Whats wrong with my pilot chat? - by bajskorv123 - 14.02.2010, 08:17
Re: Whats wrong with my pilot chat? - by VonLeeuwen - 14.02.2010, 08:22
Re: Whats wrong with my pilot chat? - by bajskorv123 - 14.02.2010, 10:24
Re: Whats wrong with my pilot chat? - by bajskorv123 - 15.02.2010, 05:47
Re: Whats wrong with my pilot chat? - by mansonh - 15.02.2010, 06:20
Re: Whats wrong with my pilot chat? - by bajskorv123 - 15.02.2010, 06:27
Re: [Solved]Whats wrong with my pilot chat? - by mansonh - 15.02.2010, 06:41
Re: [Solved]Whats wrong with my pilot chat? - by [gmR]BarMaN - 15.02.2010, 06:46

Forum Jump:


Users browsing this thread: 2 Guest(s)