help me i want script open gate to key "H" - 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: help me i want script open gate to key "H" (
/showthread.php?tid=467696)
help me i want script open gate to key "H" -
dodari1 - 04.10.2013
how to make this open gate to key "H". i don't want cmd example /lspd.... i want open gate this key "H" please write this script... link and this script
(
Re: help me i want script open gate to key "H" -
Konstantinos - 04.10.2013
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((oldkeys & KEY_CROUCH) && !(newkeys & KEY_CROUCH))
{
// do your code here to open the gate
}
return 1;
}
Re: help me i want script open gate to key "H" -
Jankingston - 04.10.2013
Konstantinos, he want to open gate from Key "H" ... Usually its Horn...it can be like this :
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((oldkeys & KEY_HORN))
{
//Your Code here
}
return 1;
}
Re: help me i want script open gate to key "H" -
Konstantinos - 04.10.2013
Actually my post was wrong. I was typing fast and as a result, I wrote them opposite.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_CROUCH) && !(oldkeys & KEY_CROUCH))
{
// do your code here to open the gate
}
return 1;
}
Your method checks for the oldkeys as well as my previous post which was wrong.
Anyways, thanks for replying and I found out my mistake!
Re: help me i want script open gate to key "H" -
dodari1 - 04.10.2013
Quote:
Originally Posted by Konstantinos
Actually my post was wrong. I was typing fast and as a result, I wrote them opposite.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if((newkeys & KEY_CROUCH) && !(oldkeys & KEY_CROUCH)) { // do your code here to open the gate } return 1; }
Your method checks for the oldkeys as well as my previous post which was wrong.
Anyways, thanks for replying and I found out my mistake!
|
but i want key h
Re: help me i want script open gate to key "H" -
SilentSoul - 04.10.2013
Quote:
Originally Posted by dodari1
but i want key h
|
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_HORN) && !(oldkeys & KEY_HORN))
{
// your rest of cmd here..
}
return 1;
}
Re: help me i want script open gate to key "H" -
dodari1 - 04.10.2013
thanks all
:
Re: help me i want script open gate to key "H" -
dodari1 - 04.10.2013
Quote:
Originally Posted by SilentSoul
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if((newkeys & KEY_HORN) && !(oldkeys & KEY_HORN)) { // your rest of cmd here.. } return 1; }
|
undefined symbol "KEY_HORN" how to fix?
Re: help me i want script open gate to key "H" -
SilentSoul - 04.10.2013
ops sorry about this , check samp keys from here :
https://sampwiki.blast.hk/wiki/Keys