[REQ]Some Requests
#1

I am not a pro at scripting, so do you know the server Awesome Stuntages? Well if you have played in it, could you tell me how to make their speedboost and jump with the 2 button?
Reply
#2

if u mean when u press a button it do something , here is how its done :
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_CROUCH))
{
//do something here
}
return 1;
}
and search on SpeedBoost there is 1 which use buttom H to speed boost
Reply
#3

Yes, but i don't understand theese strings and such and what must you add x y z + ..... there is so much, how can i set my car on air?
Reply
#4

z is the altitude so if u like add : SetVehiclePos(vehicleid,vehiclex,vehicley,vehiclez +30); will make it jump here is an example (not test):
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_CROUCH))
{
new vehicleid = GetPlayerVehicleID(playerid);
new Float:vehiclex;
new Float:vehicley;
new Float:vehiclez;
GetVehiclePos(vehicleid,vehiclex,vehicley,vehiclez);
SetVehiclePos(vehicleid,vehiclex,vehicley,vehiclez+30);
}
return 1;
}
when u do this ,, when u press Crouch, ur car will jump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)