28.12.2012, 12:51
I think you're adding the code below as a Global floating variables? You should make them local.
The code should be in here.
In case you still get errors and warnings. Post them here along with the code where your getting warnings or errors at?
pawn Код:
new Float:x,Float:y,Float:z;
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?