GamerDeMTA Posted March 16, 2013 Share Posted March 16, 2013 I want to put another fight style to all players, cuz I desactived the fight style changer. Link to comment
PaiN^ Posted March 16, 2013 Share Posted March 16, 2013 You want it as command or what ? Link to comment
GamerDeMTA Posted March 16, 2013 Author Share Posted March 16, 2013 No, when u join u have that fight style already, all have that fight style Link to comment
PaiN^ Posted March 16, 2013 Share Posted March 16, 2013 Server : addEventHandler ( 'onPlayerJoin', root, function ( ) setPedFightingStyle ( source, styleID ) end ) Link to comment
GamerDeMTA Posted March 16, 2013 Author Share 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? Link to comment
PaiN^ Posted March 16, 2013 Share Posted March 16, 2013 Edit the spawn function from the broph.lua file ( It's in the play folder ) Link to comment
GamerDeMTA Posted March 16, 2013 Author Share Posted March 16, 2013 but I say not the spawns, the SKINS that u Get when u spawn! Link to comment
iPrestege Posted March 16, 2013 Share Posted March 16, 2013 show me the broph.lua for your play gamemode Link to comment
PaiN^ Posted March 16, 2013 Share Posted March 16, 2013 on the spawnPlayer function there is a skin determining option ! You just have to change the skin ID -_-" Link to comment
iPrestege Posted March 16, 2013 Share 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 . Link to comment
GamerDeMTA Posted March 16, 2013 Author Share 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 ) Link to comment
iPrestege Posted March 16, 2013 Share 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 Link to comment
GamerDeMTA Posted March 17, 2013 Author Share 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 Link to comment
GamerDeMTA Posted March 17, 2013 Author Share Posted March 17, 2013 can someone help me with that? Link to comment
GamerDeMTA Posted March 17, 2013 Author Share Posted March 17, 2013 Can someone say me that? Link to comment
PaiN^ Posted March 17, 2013 Share 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 Link to comment
GamerDeMTA Posted March 17, 2013 Author Share Posted March 17, 2013 How to create that? + Sorry Link to comment
Tete omar Posted March 17, 2013 Share 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. Link to comment
GamerDeMTA Posted March 17, 2013 Author Share 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 Link to comment
Tete omar Posted March 17, 2013 Share 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? Link to comment
GamerDeMTA Posted March 17, 2013 Author Share 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 Link to comment
Tete omar Posted March 17, 2013 Share 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. Link to comment
GamerDeMTA Posted March 17, 2013 Author Share 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? 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