need help
#1

1.i need to auto view mini info bar on player connect
2.in the car jump code )if i press key_ look behind player jump not vehicle i need to change it to key_jump i can do that but it's not work with key_jump code
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (PRESSED(KEY_SUBMISSION))
	{
        new Float:x, Float:y, Float:z; new vehicle=GetPlayerVehicleID(playerid); //forgot somehing here Niixie :)
        if(IsPlayerInAnyVehicle(playerid))
        {
			GetVehicleVelocity(vehicle,x,y,z);
  			SetVehicleVelocity(vehicle,x,y,z+0.5);
		}
	else
		{
			GetPlayerVelocity(playerid, x, y, z);
  			SetPlayerVelocity(playerid, x, y, z +20);
        }
	}
	return 1;
}
3.i need to learn how i change unknow command for any message i need this
tere posted in this topic and not working
link http://forum.sa-mp.com/index.php?topic=181828.0
Reply
#2

Well I personally use Space Bar as the jump key. But it is natively mapped on the SHIFT key.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_JUMP)) //or KEY_SPRINT
    {
        new Float:x, Float:y, Float:z; new vehicle=GetPlayerVehicleID(playerid);
             if(IsPlayerInAnyVehicle(playerid))
                  { new vehicle=GetPlayerVehicleID(playerid);
            GetVehicleVelocity(vehicle,x,y,z);
            SetVehicleVelocity(vehicle,x,y,z+0.5);
        }
           else
        {
            GetPlayerVelocity(playerid, x, y, z);
            SetPlayerVelocity(playerid, x, y, z +20);
             }
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by DJDhan
Well I personally use Space Bar as the jump key. But it is natively mapped on the SHIFT key.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_JUMP)) //or KEY_SPRINT
    {
        new Float:x, Float:y, Float:z; new vehicle=GetPlayerVehicleID(playerid);
             if(IsPlayerInAnyVehicle(playerid))
                  { new vehicle=GetPlayerVehicleID(playerid);
            GetVehicleVelocity(vehicle,x,y,z);
            SetVehicleVelocity(vehicle,x,y,z+0.5);
        }
           else
        {
            GetPlayerVelocity(playerid, x, y, z);
            SetPlayerVelocity(playerid, x, y, z +20);
             }
    }
    return 1;
}
frist the vehicle jump by sprint and player i need player jump key only
Reply
#4

i do that's
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (PRESSED(KEY_SUBMISSION))
	{
        new Float:x, Float:y, Float:z; new vehicle=GetPlayerVehicleID(playerid); //forgot somehing here Niixie :)
        if(IsPlayerInAnyVehicle(playerid))
        {
			GetVehicleVelocity(vehicle,x,y,z);
  			SetVehicleVelocity(vehicle,x,y,z+0.5);
		}
	if (PRESSED(KEY_JUMP))
		{
			GetPlayerVelocity(playerid, x, y, z);
  			SetPlayerVelocity(playerid, x, y, z +20);
        }
	}
	return 1;
}
Reply
#5

i do with you tell my it's good but car jump by key_down
Reply
#6

i have an idea if i change this if
Код:
(PRESSED(KEY_JUMP))
to this
Код:
if (PRESSED(KEY_JUMP)(KEY_SUPMISSON))
tell me is this good and works or not works and bad
Reply
#7

pawn Код:
if(PRESSED(KEY_JUMP) || PRESSED(KEY_SUBMISSION))
Reply
#8

i try this and works
Код:
if (PRESSED(KEY_JUMP-KEY_SUBMISSION))
2 works there's prblam if i press KEY_DOWn car jump how i stop it
Reply
#9

djdhan
send for me the code
Код:
		if(IsPlayerConnected(i) && Inf[i] == 1) 
		{
			if(AGosterge[i] == false)
			{
				  TextDrawShowForPlayer(i, Text:ArkaPlan0);
				  TextDrawShowForPlayer(i, Text:ArkaPlan1);
				  TextDrawShowForPlayer(i, Text:ArkaPlan2);
				  TextDrawShowForPlayer(i, Text:ArkaPlan3);
				  TextDrawShowForPlayer(i, Text:ArkaPlan4);
				  AGosterge[i] = true;
			}
where i type words i have idea
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)