Jump to content

darhal

Members
  • Posts

    582
  • Joined

  • Last visited

Everything posted by darhal

  1. U passes wrong arguments replace createMarker and createBlip with this please test it fast createMarker(locations[loc][1], locations[loc][2], locations[loc][3]) createBlip(locations[loc][4], locations[loc][5], locations[loc][6])
  2. U passes wrong arguments replace createMarker and createBlip with this please test it fast createMarker(locations[loc][1], locations[loc][2], locations[loc][3]) createBlip(locations[loc][4], locations[loc][5], locations[loc][6])
  3. Makeeeee one table like this Table = { {0, 0, 0, 0, 0, 0} } first 3 arg are marker pos and the rest blip pos why u dont understand read my example that i gave correctly plzzz
  4. Simply and without more bla bala delte the blips table and use this function createBlipAttachedTo
  5. Can anyone help me how to script translate script steps or smth like that
  6. Line 33 replace this line with robMarker = createMarker(locations[loc][1], locations[loc][2], locations[loc][3])
  7. I dont like to leave him in dark i like to help others
  8. Another thing use localPlayer instead of player client side
  9. Read my post !! Isaid that the team not savedd save like i said
  10. The problem here is that teams will not be saved so getPlayerTeam when the player login will return nil use setAccountData -- when the player quit to save the team and use getAccountData -- when the player join to get this team
  11. I dont think this will work why ? Cuz first table pos in locations table may not be near the pos 1 in markers table i hope u understand i recommend to re-orginize it to main table
  12. Like this Table = { {0, 0, 0, 1, 1, 0}, {1, 2, 3, 2, 2, 2}, } function() local index = math.random(#Table) rMarker = createMarker(Table[index][1], Table[index][2], Table[index][3]) -- those are x, y, z pos rBlip = createBlip(Table[index][4], Table[index][5], Table[index][6]) -- thos bx, by, bz blip pos end note those table positions are not real
  13. darhal

    Add

    Yes does it work
  14. Ah now i understand the problem put them on the same table like this {Mx,My,Mz,Bx,By,Bz} which Mx, My, Mz marker pos and Bx,By,Bz blip pos there other solution but this the simplest
  15. darhal

    Add

    Ah replace the function() in the first code u post (server side code) to function (playerName, teamName) also replace getPlayerFromName() to getPlayerFromName(playerName) and getTeamFromName() to getTeamFromName(teamName)
  16. darhal

    Add

    Post client side to help u about the arguments u need to pass getPkayerFromName(here u need a player name) also u can use client or source in this function as the player and u need to pass the team using the triggerServerEvent or get it from an account data post the client side part when u trigger this event
  17. The problem that markers and locations have same length try this math.random(#locations)
  18. darhal

    while

    While is a type of loops here an eg num = 0 function () while num <= 5 do num = num + 1 end end -- while still working until num be 5 so it will repeat the num = num+1 unitil num reach 6 for more info see tutorials section I recommend xxMadexx tutorial
  19. Will it work on hotmail or yahoo
  20. How to send an email to (hotmail or yahoo nor gmail or any thing ) using scripting i know callRemote but what argument i need to pass plz help and with what account i will send it
  21. darhal

    Headshot

    In backUp function edit this setPedHeadless(source, true) MOD NOTE: Editing in Ab-47's comment from 2019 for knownledgebase, but to get rid of a bump Ab-47 said; You don't need a client side to trigger server side, all you need to do is keep the server side and do the following: Your backup timer I assume was incase the headless was changed by something else whilst being killed, so that shouldn't be false otherwise in 900 ms the ped/player would have it's head back. I added onPlayerSpawn to give the person their head back. This is really all you need and it works fine, I tested it myself. ? function MakePlayerHeadshot( attacker, weapon, bodypart, loss ) if (not attacker or attacker == source) then return end if bodypart == 9 then triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) setPedHeadless ( source, true ) killPed( source, attacker, weapon, bodypart ) setTimer( BackUp, 900, 1, source ) end end addEventHandler( "onPlayerDamage", getRootElement(), MakePlayerHeadshot ) function BackUp( source ) if getElementType ( source ) == "player" then setPedHeadless ( source, true ) end end function spawnPlayer() if (isPedHeadless(source)) then setPedHeadless(source, false) end end addEventHandler("onPlayerSpawn", root, spawnPlayer) function outputHeadshotIcon (killer, weapon, bodypart) if bodypart == 9 then cancelEvent() local r2,g2,b2 = getTeamColor ( getPlayerTeam( killer ) ) local r1,g1,b1 = getTeamColor ( getPlayerTeam( source ) ) exports.killmessages:outputMessage ( {getPlayerName(killer),{"padding",width=3},{"icon",id=weapon},{"padding",width=3},{"icon",id=256},{"padding",width=3},{"color",r=r1,g=g1,b=b1},getPlayerName(source) }, getRootElement(),r2,g2,b2) end end addEventHandler( "onPlayerKillMessage", getRootElement(), outputHeadshotIcon )
×
×
  • Create New...