Jump to content

K4stic

Members
  • Posts

    708
  • Joined

  • Last visited

Everything posted by K4stic

  1. i won use this to be work => if ( getTeamName ( getPlayerTeam ( thePlayer ) ) == "Civilian Workers" ) and ( getElementData( thePlayer , "Occupation" ) == "Delivery" ) then and no this => if ( getTeamName ( getPlayerTeam ( thePlayer ) ) == "Delivery" ) then
  2. --Server side function onVehicleEnter ( thePlayer ) if ( not delses [ getElementModel ( source ) ] ) then return end if ( not getPlayerTeam ( thePlayer ) ) then return end if ( getTeamName ( getPlayerTeam ( thePlayer ) ) == "Civilian Workers" ) and ( getElementData( thePlayer , "Occupation" ) == "Delivery" ) then --if ( getTeamName ( getPlayerTeam ( thePlayer ) ) == "Delivery" ) then getNewdelLocation ( thePlayer ) end end addEventHandler ( "onVehicleEnter", root, onVehicleEnter ) Problem: then i use this if ( getTeamName ( getPlayerTeam ( thePlayer ) ) == "Civilian Workers" ) and ( getElementData( thePlayer , "Occupation" ) == "Delivery" ) then is not working but then i use if ( getTeamName ( getPlayerTeam ( thePlayer ) ) == "Delivery" ) then it works what to do to be work with 1 wariant sorry for my bad English
  3. K4stic

    simple help :)

    it test if you are in bums team then it create blips (is checker) so i need to on player charge team to start this checker
  4. I need help to make this work to then player join on team Client Side: function checkbum( ) local thisTeam = getPlayerTeam(getLocalPlayer()) if thisTeam ~= false then if thisTeam == getTeamFromName(Bumsteam) then setElementData ( getLocalPlayer(), "Bumsstatus", "yes" ) local trashspots = getElementsByType ( "trash_spot" ) for trashKey,theTrash in ipairs(trashspots) do local Tx, Ty, Tz = getElementPosition( theTrash ) local trashBlip = createBlipAttachedTo ( theTrash, 39, 1, 0, 0, 0, 0, 0, 100) setElementParent ( trashBlip, theTrash ) end myRCs = { } local recyclecenters = getElementsByType ( "recycle_center" ) for rcKey,theRC in ipairs(recyclecenters) do local Tx, Ty, Tz = getElementPosition( theRC ) theRBlip = exports.customblips:createCustomBlip ( Tx, Ty, 20, 20, "img/recy1.png" ) end else setElementData ( getLocalPlayer(), "Bumsstatus", "no" ) local trashblips = getElementsByType ( "blip" ) for trashKey,theTrashBlip in ipairs(trashspots) do if (getElementData( theTrashBlip, "purpose" ) == "trash") then destroyElement(theTrashBlip) end end destroyElement(theRBlip) end end end addEventHandler("onClientPlayerJoin", root, checkbum) addEventHandler("onClientResourceStart", root, checkbum)
  5. SolidSnake14 i solve it i fix script in PM with TheIceman1
  6. NO is easy and simple script because i'm try be better scripter why other's need say me stealer -.-"
  7. don't sure but try: function spawnsf() setElementPosition ( source, 0, 0, 1 ) fadeCamera( source, true ) end addEvent("spawnsf",true) addEventHandler("spawnsf", root, spawnsf)
  8. K4stic

    tonumber?

    tonumber Tries to convert its argument to a number. If the argument is already a number or a string convertible to a number, then tonumber returns this number; otherwise, it returns nil example: local currentiron = tonumber ( getElementData ( source, "iron" ) ) or 0
  9. and for me how work -.-?
  10. first: local skins = { {"CJ", 0}, {"Sweet", 270}, {"Ryder", 300}, {"Ryder 2", 301}, {"Big Smoke", 269}, {"Big Smoke 2", 311}, {"Truth", 1}, {"Wuzi Mu", 294}, {"Claude", 299}, {"Madd Dogg", 297}, {"Mike Toreno", 295}, {"Cesar", 292}, {"OG Loc", 293}, {"T-Bone", 307}, {"Joe Pesci", 258}, {"Pimp", 249}, {"White Dealer", 29}, {"Black Dealer", 28}, {"Hiker", 26}, {"Casino Bouncer 1", 163}, {"Casino Bouncer 2", 164}, {"Drug Worker 1", 144}, {"Drug Worker 2", 145}, {"Drug Worker 3", 146}, {"Jacket Hippie", 101}, } for u,i in ipairs (skins) do local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, tostring(i[1]), false, false) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, tostring(i[2])) end function use() local row, col = guiGridListGetSelectedItem(GUIEditor_Grid[1]) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(GUIEditor_Grid[1], row, 1)) if model ~= "" then triggerServerEvent("useSkin", localPlayer, model) end end end addEventHandler("onClientDoubleClick", row, use) second: function buy(id) skin = setElementModel(source, id) playeraccount = getPlayerAccount(source) setAccountData(playeraccount, "standardskin", id) end addEvent("useSkin",true) addEventHandler("useSkin", root, buy)
  11. ye i just just forgot add info i add it at finnish that because in youtube i post and link of code
  12. i hope this Video help you enough Guys sorry because i forgot add info then i making it i add it at last moment so i give you link of code in this tut with all info => http://pastebin.com/M181Tbf5
  13. me know sorry me just wrong is client side and i wos add it server side my fail
  14. thx will try now can you help me and with this? function vipKnockedOff ( player, command ) if exports.SCGvip:isPlayerVIP(player) then if canPedBeKnockedOffBike ( getLocalPlayer() ) then setPlayerCanBeKnockedOffBike ( getLocalPlayer(), false ) outputChatBox ( "Now you can't be knocked off your bike." ) else setPlayerCanBeKnockedOffBike ( getLocalPlayer(), true ) outputChatBox ( "Now you can be knocked off your bike." ) end end end addCommandHandler ( "vipknock", vipKnockedOff )
  15. Shazzimal look here => https://wiki.multitheftauto.com/wiki/GivePedJetPack Just help me guys pls
  16. 1. The problem is then an VIP type the command it show the gui to all --Client side function bind_key() guiSetVisible(window, true) showCursor(true) end addEvent( "GUIsee", true ) addEventHandler ( "GUIsee", getRootElement(), bind_key ) --Server side function gui(player) if vipGUI and exports.SCGvip:isPlayerVIP(player) then triggerClientEvent ( "GUIsee", getRootElement()) end end addCommandHandler ( "viphats", gui) 2. This then player type command and is VIP ot give him Jetpack but if player type again is not removed --Server side function giveVIPJetpack( thePlayer, commandName ) if giveVIPJetpack and exports.SCGvip:isPlayerVIP( thePlayer ) then if ( not doesPedHaveJetPack( thePlayer ) ) then givePedJetPack ( thePlayer ) outputChatBox("VIP: Jetpack enabled", thePlayer, 0, 250, 0) end else if doesPedHaveJetPack( thePlayer ) then removePedJetPack ( thePlayer ) outputChatBox( "VIP: Jetpack removed", thePlayer, 250, 0, 0 ) end end end addCommandHandler( "vipjetpack", giveVIPJetpack )
  17. lol so easy and i not see it but realy thx you are best
  18. Thx Solidsnake14/Castillo you first one who make it work's big Thx but say what you do?
  19. TAPL if you remember is the server side of hats who you help me fix so for what id you talk?
  20. same not attach object to player and not use attach element's i wonna use the export as attach
  21. Hello all help me pls at this it's create the object but not attach it to player object = {} addEvent("xxx", true) addEventHandler("xxx", root, function(model) if isElement(object[source]) then destroyElement(object[source]) end local x, y, z = getElementPosition( source ) object[source] = createObject( model, x, y, z ) exports.bone_attach:attachElementToBone(object[source], source, 0.025, -0.01, 0.815, 0, 0, 180) --attachElements(object[source], source, 0.02, -0.01, 0.815, 0, 0, 180) end) addEventHandler("onPlayerQuit", root, function() if isElement(object[source]) then destroyElement(object[source]) end end)
×
×
  • Create New...