13.07.2018, 07:54
This is code I wrote in my gamemode to use the DB on the Horn press, I have F5 back it. It is not completely fault but in the game get guns, for example M4 on the car press Horn can not DB if anyone know fix help me with please?
Quote:
// Timer Name: ServerHeartbeatTwo() // TickRate: 1 secs. task ServerHeartbeatTwo[9000]() { foreach(new i: Player) { if(IsPlayerInAnyVehicle(i)) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(i, 0); else if(PlayerInfo[i][pGuns][3] == 0) SetPlayerArmedWeapon(i, 0); else SetPlayerArmedWeapon(i, 25); } if(IsPlayerInAnyVehicle(i)) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(i, 0); else if(PlayerInfo[i][pGuns][2] == 0) SetPlayerArmedWeapon(i, 0); else SetPlayerArmedWeapon(i, 24); } if(IsPlayerInAnyVehicle(i)) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(i, 0); else if(PlayerInfo[i][pGuns][5] == 0) SetPlayerArmedWeapon(i, 0); else SetPlayerArmedWeapon(i, 30); } if(IsPlayerInAnyVehicle(i)) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(i, 0); else if(PlayerInfo[i][pGuns][5] == 0) SetPlayerArmedWeapon(i, 0); else SetPlayerArmedWeapon(i, 31); } if(IsPlayerInAnyVehicle(i)) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(i, 0); else if(PlayerInfo[i][pGuns][6] == 0) SetPlayerArmedWeapon(i, 0); else SetPlayerArmedWeapon(i, 33); } if(IsPlayerInAnyVehicle(i)) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(i, 0); else if(PlayerInfo[i][pGuns][4] == 0) SetPlayerArmedWeapon(i, 0); else SetPlayerArmedWeapon(i, 32); } if(IsPlayerInAnyVehicle(i)) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(i, 0); else if(PlayerInfo[i][pGuns][4] == 0) SetPlayerArmedWeapon(i, 0); else SetPlayerArmedWeapon(i, 2; } if(IsPlayerInAnyVehicle(i)) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(i, 0); else if(PlayerInfo[i][pGuns][2] == 0) SetPlayerArmedWeapon(i, 0); else SetPlayerArmedWeapon(i, 22); } |