help with a no-cbug feature - 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: help with a no-cbug feature (
/showthread.php?tid=295714)
help with a no-cbug feature -
sasuga - 07.11.2011
hello all of you guys, i've a problem by creating a no-cbug feature, the feature its suposed that when the player cbugs it will gives the player a little "jump" ok, here is what i have and by some reason that i dont know

it doesnt works :l
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new weapon = GetPlayerWeapon(playerid);
if(newkeys & KEY_CROUCH && weapon > 23 && weapon < 35)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(playerid,X,Y,Z+0.6);
SetPlayerFacingAngle(playerid,random(360));
SetCameraBehindPlayer(playerid);
GivePlayerWeapon(playerid,1,1);
PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
return 1;
}
return 1;
}
hope some one can help me finding out why that doesnt works :l