cuz actualy i dont understand what u want
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(takeoff, 7, cmdtext);
return 0;
}
dcmd_takeoff(playerid, params[])
{
switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
{
case 592, 577, 511, 512, 593, 520, 553, 476, 519, 460, 513:
{
new msg[128], name[24];
GetPlayerName(playerid, name, sizeof (name));
format(msg,sizeof(msg), "%s taking off", name);
SendClientMessageToAll(0xEEEE00FF, msg);
}
default: SendClientMessage(playerid,0xEEEE00FF, "You are not in a plane, you cannot take off");
}
}
|
Originally Posted by mansonh
I know what you want i think, i don't need money for such a simple piece of code.
This uses the dcmd system, so just add this line to the top of your script: dcmd def 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;
}
|
Originally Posted by `FuTuRe-
Just edit a bit and it should work
![]() |