Jump to content

Weapon Stats


KillFrenzy

Recommended Posts

It's a pretty simple script. It's supposed to set the weapon skills to maximum every time a player spawns. It works when I join. The problem is, as soon as a second player joins the server and maybe spawn, the skills are reset to minimum for all players. I don't know why. I'm doing this because we are all so used to the better stats.

-- set weapon skills upon spawn 
function player_Spawn( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension ) 
    setWeaponStatsMax ( source ) 
end 
  
addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn ) 
  
  
-- set weapon stats to maximum except for dual weild weapons 
function setWeaponStatsMax ( thePlayer ) 
    setPlayerStat ( thePlayer, 69, 999 ) --pistol 
    setPlayerStat ( thePlayer, 70, 999 ) --silenced pistol 
    setPlayerStat ( thePlayer, 71, 999 ) --desert eagle 
    setPlayerStat ( thePlayer, 72, 999 ) --pump shotgun 
    setPlayerStat ( thePlayer, 73, 999 ) --sawn off shotgun 
    setPlayerStat ( thePlayer, 74, 999 ) --spaz12 
    setPlayerStat ( thePlayer, 75, 999 ) --micro uzi / mac10 
    setPlayerStat ( thePlayer, 76, 999 ) --smg / mp5 
    setPlayerStat ( thePlayer, 77, 999 ) --ak47 
    setPlayerStat ( thePlayer, 78, 999 ) --m4s 
end 

Also there is some graphical glitch with dual wielding guns.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...