How to make something like this? - 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)
+--- Thread: How to make something like this? (
/showthread.php?tid=393173)
How to make something like this? -
Louris - 17.11.2012
[ame]http://www.youtube.com/watch?v=ppmAvBHe3yY[/ame]
Can someone make filterscript?
Re: How to make something like this? -
Ballu Miaa - 17.11.2012
This is how its done!
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_FIRE)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
SetPlayerVelocity(playerid,150.0,0.0,0.0); //Change 150 to your needs!
// This is setting vehicle's Velocity to 150 at X direction!
}
}
return 1;
}
Re: How to make something like this? -
Horrible - 17.11.2012
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_FIRE)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:vx,Float:vy,Float:vz;
GetVehicleVelocity(GetPlayerVehicleID(playerid),vx,vy,vz);
SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * 1.8, vy *1.8, vz * 1.8); //adjust by yourself
}
}
return 1;
}