24.01.2010, 11:10
Just edit a bit and it should work
pawn Код:
dcmd_takeoff(playerid, params[])
{
#pragma unused params
new string[128];
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid) && !IsAirVehicle(vehicle))return SendMsg(playerid,5000,"~r~[ERROR] ~w~You have to be in a plane to takeoff!");
if(GetPlayerTeam(playerid) == TEAM_LS)SendClientMessage(playerid, COLOR_BLUE, "~g~[RADIO LS] ~w~Request to takeoff accepted!");
if(GetPlayerTeam(playerid) == TEAM_LS)format(string,sizeof(string),"[RADIO LS] %s is taking of! Please clear runways!",pInfo[playerid][name]);
if(GetPlayerTeam(playerid) == TEAM_LV)SendMsg(playerid, 5000, "~p~[RADIO LV] ~w~Request to takeoff accepted!");
if(GetPlayerTeam(playerid) == TEAM_LV)format(string,sizeof(string),"[RADIO LV] %s is taking of! Please clear runways!",pInfo[playerid][name]);
for (new i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i) && i!=playerid)
{
if(GetPlayerTeam(i) == GetPlayerTeam(playerid))SendClientMessage(i, COLOR_GREY, string);
}
}
return 1;
}