GamerDeMTA Posted March 16, 2013 Posted March 16, 2013 I want to put another fight style to all players, cuz I desactived the fight style changer.
GamerDeMTA Posted March 16, 2013 Author Posted March 16, 2013 No, when u join u have that fight style already, all have that fight style
PaiN^ Posted March 16, 2013 Posted March 16, 2013 Server : addEventHandler ( 'onPlayerJoin', root, function ( ) setPedFightingStyle ( source, styleID ) end )
GamerDeMTA Posted March 16, 2013 Author Posted March 16, 2013 Thanks and you know how to delete the random skins in freeroam when you join and how to put ME the IDs of the skins who you have randomly?
PaiN^ Posted March 16, 2013 Posted March 16, 2013 Edit the spawn function from the broph.lua file ( It's in the play folder )
GamerDeMTA Posted March 16, 2013 Author Posted March 16, 2013 but I say not the spawns, the SKINS that u Get when u spawn!
PaiN^ Posted March 16, 2013 Posted March 16, 2013 on the spawnPlayer function there is a skin determining option ! You just have to change the skin ID -_-"
iPrestege Posted March 16, 2013 Posted March 16, 2013 on the spawnPlayer function there is a skin determining option !You just have to change the skin ID -_-" No the new gamemode "play" is different .
GamerDeMTA Posted March 16, 2013 Author Posted March 16, 2013 local spawnpoint addEventHandler("onResourceStart", resourceRoot, function() spawnpoint = getRandomSpawnPoint() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) if not isElement(player) then return end if get("spawnreset") == "onSpawn" then spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) repeat until setElementModel(player,math.random(312)) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end function getRandomSpawnPoint () local spawnpoints = getElementsByType("spawnpoint") return spawnpoints[math.random(1,#spawnpoints)] end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then spawnpoint = getRandomSpawnPoint() end end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end )
iPrestege Posted March 16, 2013 Posted March 16, 2013 local spawnpoint addEventHandler("onResourceStart", resourceRoot, function() spawnpoint = getRandomSpawnPoint() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) if not isElement(player) then return end if get("spawnreset") == "onSpawn" then spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) repeat until setElementModel(player,SkinID) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end function getRandomSpawnPoint () local spawnpoints = getElementsByType("spawnpoint") return spawnpoints[math.random(1,#spawnpoints)] end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then spawnpoint = getRandomSpawnPoint() end end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end ) Change line 19
GamerDeMTA Posted March 17, 2013 Author Posted March 17, 2013 I changed, but I can put more than 1 skin for the players? Cuz I only chose 1 but I want more
PaiN^ Posted March 17, 2013 Posted March 17, 2013 You can create a table that contains the skins and then use math.random to extract a skin ,, + Don't spam
Tete omar Posted March 17, 2013 Posted March 17, 2013 I changed, but I can put more than 1 skin for the players? Cuz I only chose 1 but I want more I don't understand, explain better.
GamerDeMTA Posted March 17, 2013 Author Posted March 17, 2013 I changed in the LUA which skin the players have when they Join/Respawn, but I want more skins than one
Tete omar Posted March 17, 2013 Posted March 17, 2013 I changed in the LUA which skin the players have when they Join/Respawn, but I want more skins than one Do you mean random skin when spawning like in freeroam?
GamerDeMTA Posted March 17, 2013 Author Posted March 17, 2013 No, I've freeroam and changed it to the Skin ID "0" when you enter/spawn, but I want to put Only 2 Skins, more than that one. But not randomly
Tete omar Posted March 17, 2013 Posted March 17, 2013 No, I've freeroam and changed it to the Skin ID "0" when you enter/spawn, but I want to put Only 2 Skins, more than that one. But not randomly Give me more information, i don't really understand what do you want.
GamerDeMTA Posted March 17, 2013 Author Posted March 17, 2013 See this (LINE 19): local spawnpoint addEventHandler("onResourceStart", resourceRoot, function() spawnpoint = getRandomSpawnPoint() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) if not isElement(player) then return end if get("spawnreset") == "onSpawn" then spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) repeat until setElementModel(player,SkinID) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end function getRandomSpawnPoint () local spawnpoints = getElementsByType("spawnpoint") return spawnpoints[math.random(1,#spawnpoints)] end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then spawnpoint = getRandomSpawnPoint() end end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end ) I changed it to the Skin 1 instead random, and now I want to put the Skin ID 1 and 2, how to do?
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