 
        lolman
Members- 
                Posts70
- 
                Joined
- 
                Last visited
Everything posted by lolman
- 
	Team = createTeam("Criminal", 255, 0, 0) addCommandHandler("Criminal", function (player) setPlayerTeam (player,Team) end)
- 
	It works, thank you very much... But I got a problem with this another code which I made... function team() stafff = createTeam("Staff", 255, 255, 255) end addEventHandler("onResourceStart", getRootElement(), team) function set(thePlayer) --if hasObjectPermissionTo(thePlayer, "function.kickPlayer", true) then local skins = 211 local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setPedStat(thePlayer, 69, 1000) setPedStat(thePlayer, 70, 1000) setPedStat(thePlayer, 71, 1000) setPedStat(thePlayer, 72, 1000) setPedStat(thePlayer, 73, 1000) setPedStat(thePlayer, 74, 1000) setPedStat(thePlayer, 75, 1000) setPedStat(thePlayer, 76, 1000) setPedStat(thePlayer, 77, 1000) setPedStat(thePlayer, 78, 1000) setPedStat(thePlayer, 79, 1000) setPedWalkingStyle(thePlayer, 69) setElementModel(thePlayer, skins) giveWeapon(thePlayer, 26, 9999) giveWeapon(thePlayer, 28, 9999) giveWeapon(thePlayer, 38, 9999) setPlayerTeam ( thePlayer, stafff ) end end --addCommandHandler("staff", set) function bindd() bindKey(source, "F3", "down", set) end addEventHandler("onPlayerJoin", getRootElement(), bindd) addEventHandler("onPlayerSpawn", getRootElement(), bindd) Sometimes it doesn't set me in the team Staff and sometimes I can't use it (as example when I restart the resource).... And I want that if you've pressed on F3 (you become staff) but when you press again F3 then it should change your skin back to the old one and the team too. If someone could help me out on this..
- 
	Hello, I got a problem with my code... client : admens = "" function drew() dxDrawText(admens, 449, 333, 921, 402, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end addEvent("drawadmen", true) addEventHandler("drawadmen", getRootElement(), drew) function render ( ) addEventHandler ( "onClientRender", root, drew ) end addEventHandler ( "onClientResourceStart", resourceRoot, render ) server : admens = "" function admen(thePlayer) if hasObjectPermissionTo(thePlayer, "function.kickPlayer", true) then triggerClientEvent("drawadmen", getResourceRootElement(), admens) end end addEventHandler("onResourceStart", getRootElement(), admen) I want that it shows admins which have permission to kick players. If they have the permission then you will be able to see their names on the screen if they're online.
- 
	Your code shows the error : 42 & 44 : bad argument @ getTeamName, expected team at argument 1, got boolean
- 
	Hello, I got a problem with my code... I want that if you are in the team Criminal, and if you aim at a player which is in the team "Police" the criminal guy which aimed will get stars... But in this code, if you are in the police team and you aim, you also get stars. and as a crim you get stars too. function playerTargetCheck ( thePlayer ) local target for i, thePlayer in ipairs ( getElementsByType("player") ) do target = getPedTarget ( thePlayer ) if ( target ) then if ( getElementType ( target ) == "player" ) and thePlayer then setPlayerWantedLevel(thePlayer, 6) elseif target == thePlayer then return false end end end end setTimer ( playerTargetCheck, 1000, 0 )
- 
	Well, I forgot to mention that I've fixed the script a while ago Anyways thanks for trying to help me out
- 
	function oxygen() local oxygen = getPedOxygenLevel(localPlayer) if isElementInWater(localPlayer) then dxDrawText("Oxygen: %"..tostring(math.round(oxygen, 0)),20.0,380.0,296.0,301.0,tocolor(0,255,0,255),0.5,"bankgothic","left","top",false,false,false) end end I used it but didn't work...
- 
	Hello, I'm currently busy with making a HUD but at the part oxygen I want to let it show only if you are under water. What's the eventhandler for that?
- 
	Thank you DNL for your help. And how can I make something which sets the text of it "0" when there aren't players in that team? dxDrawText(countPlayersInTeam(ge), SX*1.295, SY*0.365, SX*0.38, SY*0.5, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "center", false, false, true) elseif (countPlayersInTeam(ge) <= 0) then dxDrawText("0", SX*1.295, SY*0.365, SX*0.38, SY*0.5, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "center", false, false, true)
- 
	I was clear enough to tell my problem... but for you I'll try to explain my problem better. You see DxDrawText? That shows the amount of players in a team (for now, every team you are in) but I want it like that it only counts the players of the team called "Criminals". Now it counts the players in the team which you are in it, but I want that it has to count the players in the team criminals.
- 
	Hello, I need help with my script... I want to countPlayers in a specific team like "Criminals" team. The current script counts every team of the player like, if you are in civilians it counts the players in that team. But I want to lock it only for Criminals... here's my code : function count() local ge = getPlayerTeam(getLocalPlayer()) local countt = countPlayersInTeam(ge) dxDrawText(countt, SX*1.295, SY*0.365, SX*0.38, SY*0.5, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "center", false, false, true, false, false) end help is needed guys...
- 
	Hello, I'm planning to make a police system but when you're arrested, I want that the player will have the animation which looks like he's cuffed. I know how to make it but I don't know what the animation is called... Could anyone help me out? Thanks in advance...
- 
	Man, really, thank you for your time for helping me out ! It worked !!
- 
	btw how can you set the engine off while driving the car and the car gets 25% health?
- 
	dude... YOU'RE AMAZING ! thank you so much !!
- 
	Nop... didn't work.... btw my server is client sided...
- 
	Hello, I've a problem with my script. function engine() local vehicle = getPedOccupiedVehicle ( getLocalPlayer() ) local health = getElementHealth ( vehicle ) if vehicle and ( health == 250 ) then outputChatBox ("Worked!",255,0,0,thePlayer) setVehicleEngineState ( vehicle, false ) end end addEventHandler ("onPlayerVehicleEnter", getRootElement(), engine) --addCommandHandler("123", engine) Here in this script I want that you can't drive the car (setengine false) when you enter the car if it has 25% health (as you can see there is (health == 250). everything works fine with the command if I use it but if i want it on playervehicleenter, it doesnt work, please help needed !
