Код:CMD:getrrk(playerid, params[]) { if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) { if(IsPlayerInAnyVehicle(playerid)) { new inscar = GetPlayerVehicleID(playerid), inseat; if(!(GetVehicleModel(inscar) == 416)) { SendClientMessage(playerid, COLOR_GREY, " You must be inside an ambulance !"); return 1; } inseat = GetPlayerVehicleSeat(playerid); if(inseat == 2 || inseat == 3) { if(HasARapidResKit[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " You already have a Rapid Response Kit, '/pickrrk' in order to pick it up."); return 1; } RemovePlayerFromVehicle(playerid); SetTimerEx("GetResponseKit", 1500, false, "i", playerid); format(string, sizeof(string), "* You have succesfully dragged the Rapid Response Kit from the ambulance."); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Paramedic %s drags the Rapid Response Kit from the back of the ambulance.", PlayerRPName(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } else { SendClientMessage(playerid, COLOR_GREY, " You must be in the rear of the ambulance in order to use this !"); } } else { SendClientMessage(playerid, COLOR_GREY, " You are not inside a vehicle !"); } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a Paramedic !"); } return 1; }
CMD:getrrk(playerid, params[])
{
if(PlayerInfo[playerid][pMember] != 4 && PlayerInfo[playerid][pLeader] != 4) return SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic !");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not inside a vehicle !");
if(HasARapidResKit[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, " You already have a Rapid Response Kit, '/pickrrk' in order to pick it up.")
new inscar = GetPlayerVehicleID(playerid);
if(GetVehicleModel(inscar) != 416) return SendClientMessage(playerid, COLOR_GREY, "You must be inside an ambulance !");
new inseat = GetPlayerVehicleSeat(playerid);
if(inseat != 2 && inseat != 3) return SendClientMessage(playerid, COLOR_GREY, "You must be in the rear of the ambulance in order to use this !");
RemovePlayerFromVehicle(playerid);
SetTimerEx("GetResponseKit", 1500, false, "i", playerid);
format(string, sizeof(string), "* You have succesfully dragged the Rapid Response Kit from the ambulance.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Paramedic %s drags the Rapid Response Kit from the back of the ambulance.", PlayerRPName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
CMD:getrrk(playerid, params[])
{
if(PlayerInfo[playerid][pMember] != 4 && PlayerInfo[playerid][pLeader] != 4) return SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic !");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not inside a vehicle !");
if(HasARapidResKit[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, " You already have a Rapid Response Kit, '/pickrrk' in order to pick it up.")
new inscar = GetPlayerVehicleID(playerid); ///// ERROR HERE ''NEW''
if(GetVehicleModel(inscar) != 416) return SendClientMessage(playerid, COLOR_GREY, "You must be inside an ambulance !");
new inseat = GetPlayerVehicleSeat(playerid);
if(inseat != 2 && inseat != 3) return SendClientMessage(playerid, COLOR_GREY, "You must be in the rear of the ambulance in order to use this !");
RemovePlayerFromVehicle(playerid);
SetTimerEx("GetResponseKit", 1500, false, "i", playerid);
format(string, sizeof(string), "* You have succesfully dragged the Rapid Response Kit from the ambulance.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Paramedic %s drags the Rapid Response Kit from the back of the ambulance.", PlayerRPName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
CMD:getrrk(playerid, params[])
{
if(PlayerInfo[playerid][pMember] != 4 && PlayerInfo[playerid][pLeader] != 4) return SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic !");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not inside a vehicle !");
if(HasARapidResKit[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, " You already have a Rapid Response Kit, '/pickrrk' in order to pick it up.");
new inscar = GetPlayerVehicleID(playerid); ///// ERROR HERE ''NEW''
if(GetVehicleModel(inscar) != 416) return SendClientMessage(playerid, COLOR_GREY, "You must be inside an ambulance !");
new inseat = GetPlayerVehicleSeat(playerid);
if(inseat != 2 && inseat != 3) return SendClientMessage(playerid, COLOR_GREY, "You must be in the rear of the ambulance in order to use this !");
RemovePlayerFromVehicle(playerid);
SetTimerEx("GetResponseKit", 1500, false, "i", playerid);
format(string, sizeof(string), "* You have succesfully dragged the Rapid Response Kit from the ambulance.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Paramedic %s drags the Rapid Response Kit from the back of the ambulance.", PlayerRPName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
public GetResponseKit(playerid) { new Float ![]() ![]() GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, pAngle); SetPlayerFacingAngle(playerid, pAngle+180); RapidResKit[playerid] = CreateObject(1789, x, y, z, 0, 0, 0); AttachObjectToPlayer(RapidResKit[playerid], playerid, 0.00, 1, -0.5, 0, 0, -90); RapidResKitActive[playerid] = 1; HasARapidResKit[playerid] = 1; return 1; } |