Up Up up - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Up Up up (
/showthread.php?tid=256340)
Up Up up -
Sid_Alexander - 20.05.2011
I Saw in some Server When you press "H" Horn key, your car goes up up and up, Can i know how can we do that?
Re: Up Up up -
DeathOnaStick - 20.05.2011
Quote:
Originally Posted by Sid_Alexander
I Saw in some Server When you press "H" Horn key, your car goes up up and up, Can i know how can we do that?
|
Search on the wiki for: OnPlayerKeyStateChange, GetPlayerKeys and SetVehicleVelocity. That's all you need to do that. Can you do it on your own?
Re: Up Up up -
Sid_Alexander - 20.05.2011
Quote:
Originally Posted by DeathOnaStick
Search on the wiki for: OnPlayerKeyStateChange, GetPlayerKeys and SetVehicleVelocity. That's all you need to do that. Can you do it on your own?
|
I Think I Can't, Can You Help Me?
Re: Up Up up -
Sid_Alexander - 20.05.2011
anyone who can help me?
Re: Up Up up -
LetsOWN[PL] - 20.05.2011
I hope that was Polish server ^^
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys == KEY_CROUCH || newkeys == 10) && IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == 0)
{
if(IsPlayerAdmin(playerid)) // Is player RCON Admin??
{
new VehicleId = GetPlayerVehicleID(playerid);
new Float:VVelocity[3];
GetVehicleVelocity(VehicleId, VVelocity[0], VVelocity[1], VVelocity[2]);
SetVehicleVelocity(VehicleId, VVelocity[0], VVelocity[1], VVelocity[2]+0.25);
}
return 1;
}
return 1;
}
Ok, so let's describe it.
This script will make your vehicle "JUMP UP" for.. Idk how high, but not so much. Just press CAPS LOCK or H button, to jump. You MUST BE in VEHICLE in DRIVER seat, and you've to be RCON ADMIN. Of course, you can make your own conditions instead
IsPlayerAdmin(playerid)..
~LetsOWN