need help - 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: need help (
/showthread.php?tid=156431)
need help -
OmarEco - 22.06.2010
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
Re: need help -
DJDhan - 22.06.2010
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;
}
Re: need help -
OmarEco - 22.06.2010
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
Re: need help -
OmarEco - 22.06.2010
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;
}
Re: need help -
OmarEco - 22.06.2010
i do with you tell my it's good but car jump by key_down
Re: need help -
OmarEco - 22.06.2010
i have an idea

if i change this if
to this
Код:
if (PRESSED(KEY_JUMP)(KEY_SUPMISSON))
tell me is this good and works

or not works and bad
Re: need help -
Hiddos - 22.06.2010
pawn Код:
if(PRESSED(KEY_JUMP) || PRESSED(KEY_SUBMISSION))
Re: need help -
OmarEco - 22.06.2010
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
Re: need help -
OmarEco - 22.06.2010
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