Button - 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: Button (
/showthread.php?tid=606371)
Button -
Micko123 - 03.05.2016
I was wondering how to create command that will execute on pressing button not typing /something. Understand me??
Re: Button -
nezo2001 - 03.05.2016
https://sampforum.blast.hk/showthread.php?tid=328267
Re: Button -
Micko123 - 03.05.2016
rly?? You are redirecting me to clickable textdraws?? rly??
Re: Button -
F1N4L - 03.05.2016
This?
Quote:
OnPlayerCommandText(playerid, command);
|
Ex.:
Quote:
OnPlayerCommandText(playerid, "/test");
|
Re: Button -
Micko123 - 03.05.2016
Never min guys. I made it. Thank you
Re: Button -
nezo2001 - 03.05.2016
Ok, keep searching for a button (y)
nezo2001 -
Sew_Sumi - 03.05.2016
Quote:
Originally Posted by nezo2001
Ok, keep searching for a button (y)
|
Even I could see without even opening the thread he was talking about OnPlayerKeyStateChange... Don't postwhore or rephunt for the sake of it now aye...
Re: Button -
Micko123 - 03.05.2016
Could this work??
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSING(KEY_YES))
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
return 1;
}
}
return 1;
}
Never did anyting before with OnPlayerKeyStateChange so I don't know how it is going