OnPlayerKeyStateChange No SIRVE =/
#10

Quote:
Originally Posted by xDarkuzSx
Посмотреть сообщение
No... No hace nada.. mira hize con esto:

pawn Код:
public OnPlayerUpdate(playerid)
{
OnPlayerKeyStateChangeLOL(playerid);
return 1;
}

forward OnPlayerKeyStateChangeLOL(playerid);
public OnPlayerKeyStateChangeLOL(playerid)
{
        new newkeys,ud,lr; // defino el newkeys XD
    GetPlayerKeys(playerid,newkeys,ud,lr);
    if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && PlayerInfo[playerid][SpecID] != INVALID_PLAYER_ID)
    {
    if(newkeys == KEY_JUMP) AdvanceSpectate(playerid);
    else if(newkeys == KEY_SPRINT) ReverseSpectate(playerid);
    }
        //mas codigos..
    return 1;
}
y funciona muy bien .. pero si uso la callback de samp no funciona no sirve de nada :c
Usa asi:

pawn Код:
public OnPlayerKeyStateChange(playerid)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && PlayerInfo[playerid][SpecID]!=INVALID_PLAYER_ID)
    {
    if(newkeys == KEY_JUMP) AdvanceSpectate(playerid);
    else if(newkeys == KEY_SPRINT) ReverseSpectate(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
OnPlayerKeyStateChange No SIRVE =/ - by xDarkuzSx - 08.04.2013, 02:04
Respuesta: OnPlayerKeyStateChange No SIRVE =/ - by adrianxd - 08.04.2013, 02:22
Re: OnPlayerKeyStateChange No SIRVE =/ - by Porta0123 - 08.04.2013, 09:42
Respuesta: OnPlayerKeyStateChange No SIRVE =/ - by OTACON - 08.04.2013, 16:09
Respuesta: OnPlayerKeyStateChange No SIRVE =/ - by xSDx - 08.04.2013, 16:38
Respuesta: OnPlayerKeyStateChange No SIRVE =/ - by xDarkuzSx - 08.04.2013, 16:46
Respuesta: OnPlayerKeyStateChange No SIRVE =/ - by Dreyfuz - 08.04.2013, 16:46
Respuesta: OnPlayerKeyStateChange No SIRVE =/ - by xSDx - 08.04.2013, 16:50
Respuesta: OnPlayerKeyStateChange No SIRVE =/ - by xDarkuzSx - 08.04.2013, 16:52
Respuesta: OnPlayerKeyStateChange No SIRVE =/ - by xSDx - 08.04.2013, 17:05

Forum Jump:


Users browsing this thread: 5 Guest(s)