SA-MP Forums Archive
[HELP]KeyStateCHange not working - 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: [HELP]KeyStateCHange not working (/showthread.php?tid=114677)



[HELP]KeyStateCHange not working - Lilcuete - 20.12.2009

Ok when some bunny hops it is supposed to slap them and say don't bunny hop when pressing shift but it doesnt work and c-bug either doesnt work
Код:
	else if (newkeys==KEY_FIRE && newkeys==KEY_CROUCH)
  {
  TogglePlayerControllable(playerid, 0);
  	SendClientMessage(playerid,COLOR_YELLOW,"DONT C-BUG you have been frozend tell a admin to unfreeze you");
  }

  	else if(newkeys == KEY_JUMP)
  {
  
	if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  {
  	new Float:shealth;
	new Float:slx, Float:sly, Float:slz;
	GetPlayerHealth(playerid, shealth);
	SetPlayerHealth(playerid, shealth-5);
	GetPlayerPos(playerid, slx, sly, slz);
	SetPlayerPos(playerid, slx, sly, slz+5);
	PlayerPlaySound(playerid, 1130, slx, sly, slz+5);
	{
  	SendClientMessage(playerid,COLOR_YELLOW,"DONT Bunny HOP");
	return 1;
	}
	}
	}



Re: [HELP]KeyStateCHange not working - dice7 - 20.12.2009

https://sampwiki.blast.hk/wiki/OnPlayerK...heck_for_a_key


Re: [HELP]KeyStateCHange not working - Lilcuete - 20.12.2009

Never mine i fixed but how can i make it show when they are running and jumping it slaps dem and says don't bunny hop


Re: [HELP]KeyStateCHange not working - dice7 - 20.12.2009

Did you even bother looking at the link ?