OnPlayerKeyStateChange help!
#1

Hey guys.

I just created two things in OnPlayerKeyStateChange. Two different things. But I got errors and it is wrong.. I dont know how to fix this..

This is it:

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
      {
          if(
PRESSED(KEY_JUMP) && jumper[playerid] == true){
        
GetPlayerVelocity(playeridxyz);
        
SetPlayerVelocity(playeridxyz0.3);}
    }
    return 
1;
    }
        if(
GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
        {
        if(
newkeys KEY_CROUCHAdvanceSpectate(playerid);
        else if(
newkeys KEY_JUMPReverseSpectate(playerid);
    }
        if(
IsBeingSpeced[playerid] == 1)
        {
        foreach(
Playeri)
        {
            if(
spectatorid[i] == playerid)
            {
                
SetPlayerInterior(iGetPlayerInterior(playerid));
                
SetPlayerVirtualWorld(iGetPlayerVirtualWorld(playerid));
            }
        }
    }
    return 
1;

And this are the errors:

PHP код:
D:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(772) : error 010invalid function or declaration
D
:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(774) : error 010invalid function or declaration
D
:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(775) : error 010invalid function or declaration
D
:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(777) : error 010invalid function or declaration
D
:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(779) : error 010invalid function or declaration
D
:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(781) : error 010invalid function or declaration
D
:\GTA San Andreas\Freeroam Server\pawno\Untitled.pwn(788) : error 010invalid function or declaration 
And I think this is wrong to.. I mean the command to do it.

PHP код:
CMD:spsj(playeridparams[])
{
    new 
str[128];
    if(
PlayerAcc[playerid][Log] == 0) return SendClientMessage(playeridCOLOR_ORANGE"You are not logged in, please login first.");
    if(
PlayerAcc[playerid][Admin] >= 1)
    
GetPlayerVelocity(playeridxyz);
    
SetPlayerVelocity(playeridxyz0.3); //Forces the player to jump
    
SendClientMessage(playeridCOLOR_YELLOW"You have succesfully enabled super jump. /spsjo to turn it off.");        jumper[playerid]=true;
    return 
1;
}
 
CMD:spsjo(playeridparams[])
{
    new 
str[128];
    if(
PlayerAcc[playerid][Log] == 0) return SendClientMessage(playeridCOLOR_ORANGE"You are not logged in, please login first.");
    if(
PlayerAcc[playerid][Admin] >= 1)
    
GetPlayerVelocity(playeridxyz);
     
SetPlayerVelocity(playerid,0.0,0.0,0.0); //Forces the player to sink
     
SendClientMessage(playeridCOLOR_ORANGE"You have succesfully disabled super jump. /spsj to turn it on");        jumper[playerid]=false;
     return 
1;

I hope anyone can help me out of this!

Thanks for reading

Gr, mickos
Reply


Messages In This Thread
OnPlayerKeyStateChange help! - by mickos - 27.12.2012, 18:19
Re: OnPlayerKeyStateChange help! - by Faisal_khan - 27.12.2012, 18:34
Re: OnPlayerKeyStateChange help! - by mickos - 27.12.2012, 18:59
Re: OnPlayerKeyStateChange help! - by Faisal_khan - 27.12.2012, 19:10
Re: OnPlayerKeyStateChange help! - by mickos - 27.12.2012, 19:15
Re: OnPlayerKeyStateChange help! - by Faisal_khan - 27.12.2012, 19:19
Re: OnPlayerKeyStateChange help! - by mickos - 27.12.2012, 19:26

Forum Jump:


Users browsing this thread: 2 Guest(s)