28.12.2012, 12:52
pawn Код:
new Float:x1,Float:y1,Float:z1;
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
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, x1, y1, z1);
SetPlayerVelocity(playerid, x1, y1, z1+ 0.3);}
return 1;
}