17.08.2010, 13:36
how can i make like a command that when they put /jump each time they jump they super jump?
if(newkeys & KEY_JUMP)
{
new Float:SuperJump[3];
GetPlayerVelocity(playerid, SuperJump[0], SuperJump[1], SuperJump[2]);
SetPlayerVelocity(playerid, SuperJump[0], SuperJump[1], SuperJump[2]+5);
return 1;
}
Uhm, do any of you actually READ the wiki sometimes? The page about OnPlayerKeyStateChange clearly states that you shouldn't use '==' to check for a key. Go read it.
|
if (strcmp("/jump", cmdtext, true, 10) == 0) { new Float:SuperJump[3]; GetPlayerVelocity(playerid, SuperJump[0], SuperJump[1], SuperJump[2]); SetPlayerVelocity(playerid, SuperJump[0], SuperJump[1], SuperJump[2]+5); return 1; }