Boost by pressing 2 - 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: Boost by pressing 2 (
/showthread.php?tid=353533)
Boost by pressing 2 -
kbalor - 23.06.2012
Good day my friend! Im looking for a filterscript or just a simple script of boost.
When you press 2 your car, motor even airplanes or heli. It boost alot and make your speed run fast. And when double tap 2. It will increase more speed than the one and if you keep pressing 2 your vehicle will run very fast that can make your car destroy even fly
P.S it dont use a real boost. its just a strong force that push your car like a boosting.
Re: Boost by pressing 2 -
Ironboy - 23.06.2012
pawn Код:
if(newkeys & KEY_SUBMISSION)
{
if (IsPlayerInAnyVehicle(playerid))
{
if((GetPlayerVehicleID(playerid) == 520) || (GetPlayerVehicleID(playerid) == 425) || (GetPlayerVehicleID(playerid) == 464)) {
return 1;
}
else {
new Float:vx, Float:vy, Float:vz;
GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
SetVehicleVelocity(GetPlayerVehicleID(playerid) ,vx*2,vy*2 ,vz*2);
}
}
}
Re: Boost by pressing 2 -
Grand_Micha - 23.06.2012
Keep in mind that GetPlayerVehicleID obviously returns the ID, while you apparently tried to check the client's model. If that is the case, try GetVehicleModel(GetPlayerVehicleID(playerid)).
Re: Boost by pressing 2 -
kbalor - 24.06.2012
Quote:
Originally Posted by Ironboy
pawn Код:
if(newkeys & KEY_SUBMISSION) { if (IsPlayerInAnyVehicle(playerid)) { if((GetPlayerVehicleID(playerid) == 520) || (GetPlayerVehicleID(playerid) == 425) || (GetPlayerVehicleID(playerid) == 464)) { return 1; } else { new Float:vx, Float:vy, Float:vz; GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz); SetVehicleVelocity(GetPlayerVehicleID(playerid) ,vx*2,vy*2 ,vz*2); } } }
|
thanks bro! + rep , anyway do you know script for flip that can passed through a wall or something that you cant get off when you get stuck??