Button
#1

I was wondering how to create command that will execute on pressing button not typing /something. Understand me??
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=328267
Reply
#3

rly?? You are redirecting me to clickable textdraws?? rly??
Reply
#4

This?
Quote:

OnPlayerCommandText(playerid, command);

Ex.:
Quote:

OnPlayerCommandText(playerid, "/test");

Reply
#5

Never min guys. I made it. Thank you
Reply
#6

Ok, keep searching for a button (y)
Reply
#7

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...
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)