Pilot Chat? Please help!
#5

Heres a more efficient version of your code

As for your bug I assume you added dcmd("p",1, cmdtext); to your OnPlayerCommandText?


pawn Код:
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,
            425, 417, 487, 488, 497, 563, 447, 469:
        {
          new string[128];
          new plName[MAX_PLAYER_NAME];
          GetPlayerName(playerid, plName, sizeof(plName));
          format(string,sizeof(string),"Pilot Chat: %s: %s",plName, params);
          SendClientMessage(i, green, string);
        }
        }
    return 1;
  }
  return 1;
}
Reply


Messages In This Thread
Pilot Chat? Please help! - by bajskorv123 - 26.01.2010, 16:11
Re: Pilot Chat? Please help! - by bajskorv123 - 27.01.2010, 08:08
Re: Pilot Chat? Please help! - by actiwe - 27.01.2010, 08:12
Re: Pilot Chat? Please help! - by bajskorv123 - 27.01.2010, 08:14
Re: Pilot Chat? Please help! - by mansonh - 27.01.2010, 08:26
Re: Pilot Chat? Please help! - by bajskorv123 - 27.01.2010, 08:50
Re: Pilot Chat? Please help! - by mansonh - 27.01.2010, 08:53

Forum Jump:


Users browsing this thread: 1 Guest(s)