My Werewolf Script
#4

Quote:
Originally Posted by Heroleo911003
View Post
Alright, the super jump works but it only works 1 time. When I type /shift I become a werewolf but the super jump isn't use everytime it only works once. Help me out here.
So.. You have to reset the variable. But, i don't really understand why there is jumping[playerid].
Anyway, try this way (the player can jump as he wants) :

PHP Code:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
activate[playerid] == 1)
    {
        if(
newkeys == KEY_JUMP && jumping[playerid] == 0)
        {
            new 
Float:werewolf_jump[3];
            
GetPlayerVelocity(playeridwerewolf_jump[0], werewolf_jump[1], werewolf_jump[2]);
            
SetPlayerVelocity(playeridwerewolf_jump[0]+100werewolf_jump[1]+100werewolf_jump[2]+100);
        }
    }
    return 
1;

or :
PHP Code:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
activate[playerid] == 1)
    {
        if(
newkeys == KEY_JUMP)
        {
            new 
Float:werewolf_jump[3];
            
GetPlayerVelocity(playeridwerewolf_jump[0], werewolf_jump[1], werewolf_jump[2]);
            
SetPlayerVelocity(playeridwerewolf_jump[0]+100werewolf_jump[1]+100werewolf_jump[2]+100);
        }
    }
    return 
1;

Reply


Messages In This Thread
My Werewolf Script - by SteSte - 04.05.2016, 19:29
Re: My Werewolf Script - by Darkwood17 - 04.05.2016, 19:34
Re: My Werewolf Script - by SteSte - 05.05.2016, 11:35
Re: My Werewolf Script - by Dayrion - 05.05.2016, 12:06
Re: My Werewolf Script - by SteSte - 19.05.2016, 23:01
Re: My Werewolf Script - by Virtual1ty - 19.05.2016, 23:24
Re: My Werewolf Script - by SteSte - 19.05.2016, 23:34
Re: My Werewolf Script - by Dayrion - 20.05.2016, 08:23
Re: My Werewolf Script - by SteSte - 20.05.2016, 12:39

Forum Jump:


Users browsing this thread: 1 Guest(s)