Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - #include <a_samp>
 - public OnFilterScriptInit()
 - {
 - print("\n--------------------------------------");
 - print("RC Boom Boom FS \nbased on the killstreak in \nCall of Duty: Black ops");
 - print("Script created by Hiddos (McFaik)\n--------------------------------------\n");
 - return 1;
 - }
 - public OnPlayerDisconnect(playerid, reason)
 - {
 - DestroyVehicle(GetPVarInt(playerid, "KSV"));
 - return 1;
 - }
 - forward PutPlayerInStreakRcVehicle(playerid);
 - public PutPlayerInStreakRcVehicle(playerid)
 - {
 - new Float:Pos[4]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
 - SetPVarFloat(playerid, "rcX", Pos[0]);
 - SetPVarFloat(playerid, "rcY", Pos[1]);
 - SetPVarFloat(playerid, "rcZ", Pos[2]);
 - SetPVarFloat(playerid, "rcA", Pos[3]);
 - GetPlayerFacingAngle(playerid, Pos[3]);
 - new veh = CreateVehicle(441, Pos[0], Pos[1], Pos[2], Pos[3], -1, -1, 0);
 - PutPlayerInVehicle(playerid, veh, 0);
 - SetPVarInt(playerid, "KSV", veh);
 - CallRemoteFunction("OnPlayerEnterStreakRcVehicle", "ii", playerid, veh);
 - }
 - public OnVehicleDeath(vehicleid)
 - {
 - for(new i; i < MAX_PLAYERS; i++)
 - {
 - if(GetPVarInt(i, "KSV") == vehicleid) OnPlayerKeyStateChange(i, KEY_FIRE, 0);
 - }
 - return 1;
 - }
 - public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
 - {
 - if(newkeys & KEY_FIRE && !(oldkeys & KEY_FIRE))
 - {
 - if(GetPVarInt(playerid, "rcTimer") > 0)
 - {
 - ReturnPlayerToNormalState(playerid);
 - KillTimer(GetPVarInt(playerid, "rcTimer"));
 - DeletePVar(playerid, "rcTimer");
 - return 1;
 - }
 - if(GetPVarInt(playerid, "KSV")) //KillStreakVehicle
 - {
 - new Float:Pos[6]; GetVehiclePos(GetPVarInt(playerid, "KSV"), Pos[0], Pos[1], Pos[2]);
 - SetPlayerPos(playerid, GetPVarFloat(playerid, "rcX"), GetPVarFloat(playerid, "rcY"), GetPVarFloat(playerid, "rcZ"));
 - SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "rcA"));
 - //3 Explosion for impact
 - CreateExplosion(Pos[0] + floatdiv(random(250), 100), Pos[1] + floatdiv(random(250), 100), Pos[2] + floatdiv(random(250), 100), 7, 12);
 - CreateExplosion(Pos[0] + floatdiv(random(250), 100), Pos[1] + floatdiv(random(250), 100), Pos[2] + floatdiv(random(250), 100), 7, 12);
 - CreateExplosion(Pos[0] + floatdiv(random(250), 100), Pos[1] + floatdiv(random(250), 100), Pos[2] + floatdiv(random(250), 100), 7, 12);
 - new Float:angle = float( random( 360 ) );
 - Pos[3] = Pos[0] + 15 * floatsin(-angle, degrees);
 - Pos[4] = Pos[1] + 15 * floatcos(-angle, degrees);
 - Pos[5] = float( random( 18 ) );
 - SetPlayerCameraPos(playerid, Pos[3], Pos[4], Pos[5]);
 - SetPlayerCameraLookAt(playerid, Pos[0], Pos[1], Pos[2]);
 - SetTimerEx("GoAwayWithVehicleDamnit", 500, 0, "i", GetPVarInt(playerid, "KSV"));
 - DeletePVar(playerid, "KSV");
 - SetPVarInt(playerid, "rcTimer", SetTimerEx("ReturnPlayerToNormalState", 3250, 0, "i", playerid) + 1);
 - CallRemoteFunction("OnPlayerDetonateStreakRcVehicle", "ifff", playerid, Pos[0], Pos[1], Pos[2]);
 - return 1;
 - }
 - }
 - return 1;
 - }
 - forward GoAwayWithVehicleDamnit(vehicleid);
 - public GoAwayWithVehicleDamnit(vehicleid)
 - { //Major function, I know lolz
 - DestroyVehicle(vehicleid);
 - }
 - forward ReturnPlayerToNormalState(playerid);
 - public ReturnPlayerToNormalState(playerid)
 - {
 - DeletePVar(playerid, "rcTimer");
 - SetCameraBehindPlayer(playerid);
 - CallRemoteFunction("OnPlayerExitStreakRcVehicle", "i", playerid);
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment