public Action CmdNoRescue(int client, int args)
{
if(!client)
{
PrintToServer("[SM] Unable to execute this command from the server console!");
LogCommand("A command was executed from the server console, but is not permitted");
return Plugin_Handled;
}
if(g_bVehicleReady)
{
char map[32];
GetCurrentMap(map, sizeof(map));
if(StrEqual(map, "c1m4_atrium"))
{
CheatCommand(client, "ent_fire", "relay_car_escape trigger");
CheatCommand(client, "ent_fire", "car_camera enable");
EndGame();
}
else if(StrEqual(map, "c2m5_concert"))
{
CheatCommand(client, "ent_fire", "stadium_exit_left_chopper_prop setanimation exit2");
CheatCommand(client, "ent_fire", "stadium_exit_left_outro_camera enable");
EndGame();
}
else if(StrEqual(map, "c3m4_plantation"))
{
CheatCommand(client, "ent_fire", "camera_outro setparentattachment attachment_cam");
CheatCommand(client, "ent_fire", "escape_boat_prop setanimation c3m4_outro_boat");
CheatCommand(client, "ent_fire", "camera_outro enable");
EndGame();
}
else if(StrEqual(map, "c4m5_milltown_escape"))
{
CheatCommand(client, "ent_fire", "model_boat setanimation c4m5_outro_boat");
CheatCommand(client, "ent_fire", "camera_outro setparent model_boat");
CheatCommand(client, "ent_fire", "camera_outro setparentattachment attachment_cam");
EndGame();
}
else if(StrEqual(map, "c5m5_bridge"))
{
CheatCommand(client, "ent_fire", "heli_rescue setanimation 4lift");
CheatCommand(client, "ent_fire", "camera_outro enable");
EndGame();
}
else if(StrEqual(map, "c6m3_port"))
{
CheatCommand(client, "ent_fire", "outro_camera_1 setparentattachment Attachment_1");
CheatCommand(client, "ent_fire", "car_dynamic Disable");
CheatCommand(client, "ent_fire", "car_outro_dynamic enable");
CheatCommand(client, "ent_fire", "ghostanim_outro enable");
CheatCommand(client, "ent_fire", "ghostanim_outro setanimation c6m3_outro");
CheatCommand(client, "ent_fire", "car_outro_dynamic setanimation c6m3_outro_charger");
CheatCommand(client, "ent_fire", "outro_camera_1 enable");
CheatCommand(client, "ent_fire", "c6m3_escape_music playsound");
EndGame();
}
else
{
PrintToChat(client, "[SM] This map doesn't have a rescue vehicle or is not supported!");
}
}
else
{
PrintToChat(client, "[SM] Wait for the rescue vehicle to be ready first!");
}
char name[256];
GetClientName(client, name, sizeof(name));
LogCommand("'%N' used the 'No Rescue' command", client);
return Plugin_Handled;
}