Jump to content

Hell-Mate

Members
  • Posts

    198
  • Joined

  • Last visited

Everything posted by Hell-Mate

  1. rofl And then you will create another topic on this forum asking this: So stop thinking you are smarter that me and I'm just a noob. Pretty much all the advices/solutions I gave so far are clean and bugfree (anyone here to say I don't ?!). So when I say you to use an element data, then use that damned elemrnt data. I won't repeat again, and I won't help you anymore if you just don't give a sh*t about what I can say. Thought you understood since my last post, but you still didn't ... Look cutie, if u still treat me like this fuc*ing way then shut the fu*k up, okay ? #Weird-Person .. i just said my thought about player money i didnt said " im smarter than u citezen and i will just remove local u stupid " .. i just said what i thought and u can reply no, if u did that then it will deduce that .. try to talk a better way or stfu .. have a nice day.
  2. about the player money, i will just remove local before playermoney define
  3. It now fixing the problem .. it will just destroy the blip of the last one who use /hitme when dying for example : 1) i used /hitme, 2) my friend used /hitme after me used it 3) me or my friend died = my friend blip will only get destroyed and the element data will get removed from me and my friend. got it ?
  4. how it will add the blips to the table without table.insert ??
  5. Dont judge a script if you never checks it or check how it works .. anyway the script sold to CFH server ..
  6. hmmm, anyone can help ??
  7. That's inefficient. You should use [[ ]] instead. He can use /n for every new line instead of these.
  8. well open ACL.XML and add this line under console group. "Console"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "user.Console"> -- this line --> or simply add yourself to console group from admin panel and remove acc names of these ppl who banned all staffs.
  9. "command.ban" access="false"> "command.banip" access="false"> "command.unbanip" access="false"> "command.reloadbans" access="false">
  10. all files must be compiled with the same compiler and all file types is .luac
  11. Hello community .. im askinf about tables x2 i have a problem. i have made a hitme script and this script create a blip attached to player and i added an event which when a player dies so the blip get destroyed. my previous problem is the blip is getting destroyed for only the last player who used hitme command when dying and if another player died who yoused the cmd first nothing happen and the blip stays so i asked for help in community and someone told me to create tables and use table.insert so i did that and another problem released -.- now when two or more players are hit and one of them died so the blip getting destroyed to all hits .. hope any one can help and here is the script >> hitBlip = { } function hitme ( thePlayer, commandName, moneyAmount ) local playermoney = getPlayerMoney ( thePlayer ) if playermoney < tonumber(moneyAmount) then outputChatBox ( "You dont have enough money to make hit",thePlayer,255,0,0, false ) else amount = tonumber(moneyAmount) if amount > 500000 then outputChatBox ( "Maximum hit amount is $500000", thePlayer,255,0,0, false ) else if amount < 50000 then outputChatBox ( "Minimum hit amount is $50000", thePlayer,255,0,0, false ) else if ( getElementData ( thePlayer, 'Player' ) == 'Hit' ) then outputChatBox ( "You are already a hit", thePlayer,255,0,0, false ) else local playername = getPlayerName ( thePlayer ) hisBlip = createBlipAttachedTo ( thePlayer, 26 ) table.insert ( hitBlip, hisBlip ) setPlayerNametagColor ( thePlayer, 0, 0, 0 ) takePlayerMoney ( thePlayer, amount ) setElementData ( thePlayer, 'Player', "Hit" ) outputChatBox ( "You have placed a $" .. amount .. " hit on your self",thePlayer,255,235,0, false ) outputChatBox ( "A hit has been placed on " .. playername .. " For $" .. amount .. ".",root,255,235,0, false ) end end end end end addCommandHandler ("hitme", hitme) function ondie () if ( getElementData ( source, 'Player' ) == 'Hit' ) then removeElementData( source, 'Player', "Hit" ) setPlayerNametagColor ( source, 255, 255, 0 ) for key, hisBlip in ipairs( hitBlip ) do destroyElement ( hisBlip ) end end end addEventHandler ( "onPlayerWasted", getRootElement(), ondie )
  12. You just took it wrong side .. i just mean that's not my ques not "learn to read you idiot" anyway if you thought this then you are wrong im not that rude. and sorry anyway ..
  13. Fixed your nasty code. You're welcome. look at my ques ..pfft -.-
  14. Hello community,, i need help in how to create a table and store blips on it. bec i made a hit system and i need when the player dies all the blips get destroyed not only the last one who used the command .. here is the code i want to add tables on it. function consoleCreateObject ( thePlayer, commandName, id ) if ( thePlayer ) then teamElement = getPlayerTeam( thePlayer ) if getTeamName(teamElement) == "Camorra" then local x, y, z = getElementPosition ( thePlayer ) object = createObject ( tonumber(id), x, y, z, 0, 0, 0 ) if ( object ) then outputChatBox ( "Created Your Camorra group object",thePlayer,0,255,0, false ) else if not ( object ) then outputChatBox ( "Error Wrong Element ID",thePlayer,255,0,0, false ) else if getTeamName(teamElement) ~= "Camorra" then outputChatBox ( "You have to be in Camorra group to use this command",thePlayer,255,0,0, false ) end end end end end end addCommandHandler ( "create", consoleCreateObject ) function fady ( thePlayer, commandName ) if ( thePlayer ) then teamElement = getPlayerTeam( thePlayer ) if getTeamName(teamElement) == "Camorra" then destroyElement ( object ) outputChatBox ( "You have destroyed objects that you create",thePlayer,0,255,0, false ) else cancelEvent () end end end addCommandHandler ( "destroyobjects", fady ) i want when i do /destroyobjects, then all objects get destroyed not onlt the last object as it did now ..
  15. --Tested --Now its not canceling damage and i must punch with spraycan to heal, i cant heal with spraying --No debug errors/warnings
  16. triggerServerEvent ( "MedicHeal", attacker ) ??? i think the problem is in the server side ..
  17. i did all what you said but something wrong , here is the script > --Server local skin = {[275] = true} addEvent ( "MedicHeal", true ) function fady (attacker, attackerweapon, bodypart, loss) playerHealth = getElementHealth (source) sourceMoney = getPlayerMoney (source) if not skin[getElementModel(attacker)] then return end if ( playerHealth < 199 ) and ( sourceMoney < 30 ) then cancelEvent () else if (attackerweapon == 41) and (loss > 1) and ( playerHealth < 199 ) and ( sourceMoney > 30 ) then setElementHealth ( source, playerHealth+15 ) givePlayerMoney ( attacker, 2*playerHealth ) setElementData ( attacker, "medic", true ) takePlayerMoney ( source, 2*playerHealth ) end end end addEventHandler ( "MedicHeal", getRootElement(), fady ) --Client function fady (attacker, weapon, bodypart) medicskin = getElementModel ( attacker, 275 ) if ( weapon == 41 ) and ( medicskin == true ) then cancelEvent () triggerServerEvent ( "MedicHeal", localPlayer ) else -- end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), fady )
  18. well, im using onPlayerDamage on the medic function so if i canceled the damage so the medic function will not work. so which event should i use instead of onPlayerDamage ?
  19. Thanks. learned how to make table and solved the problem Thanks
  20. Hello community ,, how to disable weapon damage to only one player or only one Data ? im scripting a medic job and i want this help to complete it.
  21. and how to make this ? i have no idea about tables ..
  22. Hello community ,, i have made a /hitme command and this command creates a blip attached to the player. and made the blip destroyed onPlayerWasted. the Problem Is : and the two died, only the 2nd one blip will get destroyed. that means it only destroys the blip of the last one who used the command .. and here is my script>> function hitme ( thePlayer, commandName, moneyAmount ) local playermoney = getPlayerMoney ( thePlayer ) if playermoney < tonumber(moneyAmount) then outputChatBox ( "You dont have enough money to make hit",thePlayer,255,0,0, false ) else amount = tonumber(moneyAmount) if amount > 500000 then outputChatBox ( "Maximum hit amount is $500000", thePlayer,255,0,0, false ) else if amount < 50000 then outputChatBox ( "Minimum hit amount is $50000", thePlayer,255,0,0, false ) else if ( getElementData ( thePlayer, 'Player' ) == 'Hit' ) then outputChatBox ( "You are already a hit", thePlayer,255,0,0, false ) else local playername = getPlayerName ( thePlayer ) hitBlip = createBlipAttachedTo ( thePlayer, 26 ) setPlayerNametagColor ( thePlayer, 0, 0, 0 ) takePlayerMoney ( thePlayer, amount ) setElementData ( thePlayer, 'Player', "Hit" ) outputChatBox ( "You have placed a $" .. amount .. " hit on your self",thePlayer,255,235,0, false ) outputChatBox ( "A hit has been placed on " .. playername .. " For $" .. amount .. ".",root,255,235,0, false ) end end end end end addCommandHandler ("hitme", hitme) function ondie () if ( getElementData ( source, 'Player' ) == 'Hit' ) then removeElementData( source, 'Player', "Hit" ) setPlayerNametagColor ( source, 255, 255, 0 ) destroyElement ( hitBlip ) end end addEventHandler ( "onPlayerWasted", getRootElement(), ondie )
  23. Are you kidding me ? you just changed outputs -.- and added another Date to the player.. and checks if the amount is number .. and my ques is i want to check who killed the hit .. to get the money ..
×
×
  • Create New...