22.09.2011, 13:51
Hi , is there any way to detect if a player bunny up and freeze him for 4Sec ?
Thanx
Thanx
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys & KEY_JUMP) { new Ticks=GetTickCount(); if(Ticks-GetPVarInt(playerid,"LastBunnyHopMS")<4000) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z); SetPlayerPos(playerid,X,Y,Z+30); GameTextForPlayer(playerid,"~p~~h~you wanna get high?",4000,4); } SetPVarInt(playerid,"LastBunnyHopMS",Ticks); } return 1; }