Vladimir5 Posted January 3, 2012 Share Posted January 3, 2012 It's epitty:( -- Settings for when a player joins -- XYZ coördinates local joinX = 823 local joinY = -1103 local joinZ = 25 -- Weapon and ammo local joinWeapon = 5 local joinAmmo = 200 -- Message when player joins local joinMessage = "Welcome=)" -- Skin that player gets local joinSkin = 30 --Players team setPlayerTeam(thePlayer,getTeamFromName("Players")) -- Settings for when a player dies -- XYZ coördinates local spawnX = 2036 local spawnY = -1411 local spawnZ = 17 -- Weapon and ammo local spawnWeapon = 5 local spawnAmmo = 200 -- Skin that player gets local spawnSkin = 30 -- Settings for the amounts of money -- Money the killer gets local killerMoney = 0 -- Money removed from player when they die local deadPlayerMoney = 0 -- Money you get when you join local joinMoney = 1000 -- Functions -- This function spawns players when they join function spawnOnJoin() spawnPlayer(source, joinX, joinY, joinZ, 0 , joinSkin) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox(joinMessage, source) giveWeapon(source, joinWeapon, joinAmmo) givePlayerMoney(source, joinMoney) setPlayerTeam(source, end -- This function spawns players after they died function spawnOnDead(ammo, killer, weapon, bodypart) outputChatBox(getPlayerName(source).." Died:(.") takePlayerMoney(source, deadPlayerMoney) if (killer) and (killer ~= source) then givePlayerMoney(killer, killerMoney) end setTimer(spawnPlayer, 4000, 1, source, spawnX, spawnY, spawnZ, 0, spawnSkin) setCameraTarget(source, source) setTimer(giveWeapon, 4000, 1, source, spawnWeapon, spawnAmmo) end -- Event handlers addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin) addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead) Link to comment
Kenix Posted January 3, 2012 Share Posted January 3, 2012 https://wiki.multitheftauto.com/index.ph ... troduction Link to comment
arezu Posted January 4, 2012 Share Posted January 4, 2012 what do you call this? setPlayerTeam(source, .. the line is not finished. Use /debugscript 3 next time Link to comment
Evil-Cod3r Posted January 4, 2012 Share Posted January 4, 2012 function assignNewTeam ( source, teamName ) local theTeam = createTeam ( Players ) if theTeam then setPlayerTeam (source, theTeam ) end end addEventHandler ( "onPlayerJoin", getRootElement(), assignNewTeam ) Link to comment
CapY Posted January 4, 2012 Share Posted January 4, 2012 function assignNewTeam ( source, teamName ) local theTeam = createTeam ( Players ) if theTeam then setPlayerTeam (source, theTeam ) end end addEventHandler ( "onPlayerJoin", getRootElement(), assignNewTeam ) Stop copying things from Wiki. Link to comment
JR10 Posted January 4, 2012 Share Posted January 4, 2012 local theTeam = createTeam ( 'Players' ) function assignNewTeam ( ) if theTeam then setPlayerTeam (source, theTeam ) end end addEventHandler ( "onPlayerJoin", getRootElement(), assignNewTeam ) Link to comment
Evil-Cod3r Posted January 4, 2012 Share Posted January 4, 2012 function assignNewTeam ( source, teamName ) local theTeam = createTeam ( Players ) if theTeam then setPlayerTeam (source, theTeam ) end end addEventHandler ( "onPlayerJoin", getRootElement(), assignNewTeam ) Stop copying things from Wiki. what you want me to do ? wiki that we learn form it you noob stop post unhelp postes ! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now