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;
}