Key to commands ?? - 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: Key to commands ?? (
/showthread.php?tid=445831)
Key to commands ?? -
xganyx - 23.06.2013
Press N
For My Weapon command
How Can I Do that ?
Re: Key to commands ?? -
DobbysGamertag - 23.06.2013
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
Re: Key to commands ?? -
xganyx - 23.06.2013
Can You Explain more for me
Re: Key to commands ?? -
Lordzy - 23.06.2013
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_NO) //Normal no response is of key "N".
{
//Stuffs here.
}
return 1;
}
I suggest you to read the wiki of OnPlayerKeyState first.
Re: Key to commands ?? -
DobbysGamertag - 23.06.2013
Do you have a weapon command already?
i can make you an example giving a weapon if you like?
Re: Key to commands ?? -
Anak - 23.06.2013
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_NO) //No key
{
// do something here !
// example:
SendClientMessage(playerid, -1," noob!!!");//.....
//etc
}
return 1;
}
Re: Key to commands ?? -
xganyx - 23.06.2013
Thanks All.
DobbysGamertag: I Ready Have A weapon command but thank you.