
[Lsrcr]Robin wrote:Landing on a building wouldn't be abusing anyway? You ca just land your whole plane on top of.. anything really.[Lsrcr]Big wrote:You will be shot up to a certain height that you can deploy your parachute, it's not high enough that you can glide to a building.Spinel wrote:this will be abused way too much if you ask me, so -1 to that one, stop trying to make everything easier.How do you abuse it tho?

Spinel wrote:That makes no sense.. " in to the middle of the air and just fly away " what u think how high u fly? 50000 meters? And 2nd there exist something called " sniper "[Lsrcr]Robin wrote:It can be with both a button press and a health detection.
And I really don't see how this can be abused.
few guys are chasing you and you jump into hydra and eject yourself in to the middle of the air and just fly away.
public OnPlayerCommandText(playerid, cmdtext[])
{
//below function is not needed in LSRCR as hydra is spawned by server
if(!strcmp(cmdtext, "/hydra", true)) //Spawns hydra for TEST
{
new Float:X, Float:Y, Float:Z;
//new hydra; object defined on top
GetPlayerPos(playerid, Float: X, Float: Y , Float: Z);
hydra = CreateVehicle(520, X, Y, Z + 2.0, 0, -1, -1, 5000);
PutPlayerInVehicle(playerid, hydra, 0);
SendClientMessage(playerid, -1, "Hydra Spawned");
return 1;
}
//eject function
if(!strcmp(cmdtext, "/emg", true))
//emergency exit command could be changed with just a numpad button
//for easier/faster access
{
//(Pseudo code)if playerIsInHydra
new Float:X, Float:Y, Float:Z;
new Float:hydraX, Float:hydraY, Float:hydraZ;
GivePlayerWeapon(playerid, 46, 1); //give parachute
GetPlayerPos(playerid, Float: X, Float: Y , Float: Z); //get playerPos
SetPlayerPos(playerid, X, Y, Z + 15); //set player pos to current X, Y. However add +15 to Z axis
//ApplyAnimation(playerid, "PED", "SEAT_IDLE", 4.0, 1, 0, 0, 2, 0);
GetVehiclePos(hydra, hydraX, hydraY, hydraZ); //hydra object initialized on top
CreateExplosion(hydraX, hydraY, hydraZ, 12, 10.0); //creates an explosion effect on the hydra, after being ejected
//if player!InHydra
//Display Error: "You cannot use this command with this vehicle"
return 1;
}
return 0;
}

Hawk wrote:Hey guys, since I've been mentioned by Robin, I am posting this comment. :flush: (I was army when I posted this, since I left for a break)Glad that you made this!
It is probably one of the easiest thing to do, so if you do not have any idea on how scripting works you can never say that such thing cannot be created.
I have scripted the main logic of the emergency eject as shown in the code below.
Variables could be changed (to be launched higher and so on).
This thing only took me 20 minutes to create (including downloading SA:MP server and research code) because it is only just a couple of lines!
In addition, I've put comments to explain my code.
To understand more clearly I uploaded a video of how this code works.
Video: https://www.youtube.com/watch?v=FEVJf1GFsTA
Code:
Code: Select allObviously, there can be lots of ways how this can be applied for example: animations applied (sitting) and objects attached to player.public OnPlayerCommandText(playerid, cmdtext[]) { //below function is not needed in LSRCR as hydra is spawned by server if(!strcmp(cmdtext, "/hydra", true)) //Spawns hydra for TEST { new Float:X, Float:Y, Float:Z; //new hydra; object defined on top GetPlayerPos(playerid, Float: X, Float: Y , Float: Z); hydra = CreateVehicle(520, X, Y, Z + 2.0, 0, -1, -1, 5000); PutPlayerInVehicle(playerid, hydra, 0); SendClientMessage(playerid, -1, "Hydra Spawned"); return 1; } //eject function if(!strcmp(cmdtext, "/emg", true)) //emergency exit command could be changed with just a numpad button //for easier/faster access { //(Pseudo code)if playerIsInHydra new Float:X, Float:Y, Float:Z; new Float:hydraX, Float:hydraY, Float:hydraZ; GivePlayerWeapon(playerid, 46, 1); //give parachute GetPlayerPos(playerid, Float: X, Float: Y , Float: Z); //get playerPos SetPlayerPos(playerid, X, Y, Z + 15); //set player pos to current X, Y. However add +15 to Z axis //ApplyAnimation(playerid, "PED", "SEAT_IDLE", 4.0, 1, 0, 0, 2, 0); GetVehiclePos(hydra, hydraX, hydraY, hydraZ); //hydra object initialized on top CreateExplosion(hydraX, hydraY, hydraZ, 12, 10.0); //creates an explosion effect on the hydra, after being ejected //if player!InHydra //Display Error: "You cannot use this command with this vehicle" return 1; } return 0; }
I just wanted to show you that it is possible lol :flush:
Users browsing this forum: No registered users and 2 guests