Two times Y, for two different things.. [HELP]
#5

I think you're adding the code below as a Global floating variables? You should make them local.

pawn Код:
new Float:x,Float:y,Float:z;
The code should be in here.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new Float:x,Float:y,Float:z;
    if(newkeys & KEY_CROUCH && GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
            {
                AdvanceSpectate(playerid);
            }
            else if(newkeys & KEY_JUMP && GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
            {
                ReverseSpectate(playerid);
            }
    if(PRESSED(KEY_JUMP) && jumper[playerid] == true){
    GetPlayerVelocity(playerid, x, y, z);
    SetPlayerVelocity(playerid, x, y, z+ 0.3);}
    return 1;
}

In case you still get errors and warnings. Post them here along with the code where your getting warnings or errors at?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)