Jump to content

Hassam

Members
  • Posts

    53
  • Joined

  • Last visited

Everything posted by Hassam

  1. Hassam

    GroupSystem

    Hello, I'm posting here because I need help, where I put that --Server function getGroupList() local count = {} for ind, data in pairs(groupTable) do if (data[5] == slot) then if (not slot[ind]) then slot[ind] = 0 end slot[ind] = slot[ind] + 1 end for ind2, data2 in pairs(GAC) do if (data2[1] == ind) then if (not count[ind]) then count[ind] = 0 end count[ind] = count[ind] + 1 end end end triggerClientEvent(client, "groupSystem.addGroupList", client, groupTable, count, slot) end addEvent("groupSystem.getGroupList", true) addEventHandler("groupSystem.getGroupList", root, getGroupList) And that: --Client function addGroupList(group, count, slot) gTable = group guiGridListClear(groupListGrid) for ind, data in pairs(group) do local row = guiGridListAddRow(groupListGrid) guiGridListSetItemText(groupListGrid, row, 1, tostring(ind), false, false) guiGridListSetItemText(groupListGrid, row, 2, tostring(data[1]), false, false) guiGridListSetItemText(groupListGrid, row, 3, tostring(count[ind]), false, false) guiGridListSetItemText(groupListGrid, row, 4, tostring(slot[ind]), false, false) c[ind] = count[ind] s[ind] = slot[ind] end end addEvent("groupSystem.addGroupList", true) addEventHandler("groupSystem.addGroupList", root, addGroupList) function searchGroupList() guiGridListClear(groupListGrid) local text = guiGetText(source) if (not text or text == "") then triggerServerEvent("groupSystem.getGroupList", root) return end for ind, data in pairs(gTable) do if (string.find(ind:lower(), text:lower(), 1, true)) then local row = guiGridListAddRow(groupListGrid) guiGridListSetItemText(groupListGrid, row, 1, tostring(ind), false, false) guiGridListSetItemText(groupListGrid, row, 2, tostring(data[1]), false, false) guiGridListSetItemText(groupListGrid, row, 3, tostring(c[ind]), false, false) guiGridListSetItemText(groupListGrid, row, 4, tostring(s[ind]), false, false) end end end On groupsystem from Seb aka Smart, my objective is creating slots, I made that and I can't see the slots. Note: I edited the Database to put slots.
  2. Hassam

    Jobs

    ahhh, I need another help, I can't take the job with my group handleJobMarkerHit = function(player) local role = getElementData(source,"group") if (getElementType(player) == "player") then if (not exports.groupsys:checkGroupAccess(player, 16)) then return end if (getElementData(player, dataToFindPlayersJob) == role or role == "ALL") then if isPedInVehicle(player) then return end local info= getElementData(source, "info") local skin= getElementData(source, "skins") triggerClientEvent(player, "jobsystem.showJobGUI", root, getElementData(source, "title"), skin, info) else exports["TopBarChat"]:sendClientMessage("This marker is allowed for only "..role.." group.", player, 255, 0, 0) end end end
  3. Hassam

    Jobs

    It's working, thanks a lot
  4. Hassam

    Jobs

    ahh okay, it's like marker[1], marker[2], etc..? Markers= [1] - "BlaBla", [2] - "Bla",
  5. Hassam

    Jobs

    Hello, I need help, the problem is I can't set my job to team (it's only work for Occupation). local job = {} createTheJobs = function() for a,b in ipairs(jobs) do marker = createMarker(b.markerX, b.markerY, b.markerZ, "cylinder", markerSize or 2, b.markerColorR, b.markerColorG, b.markerColorB) blip = createBlipAttachedTo(marker,b.blip) setElementVisibleTo (blip, root, b.alpha) setBlipVisibleDistance(blip, 500) setElementData(marker, "title", b.jobTitle) setElementData(marker, "group", b.group) setElementData(marker, "team", b.team) job[marker] = b.group setElementData(marker, "info", b.information) setElementData(marker, "skins", b.skins) addEventHandler("onMarkerHit", marker, handleJobMarkerHit) end end addEventHandler("onResourceStart", resourceRoot, createTheJobs) handleJobMarkerHit = function(player) local role = getElementData(source,"group") if (getElementType(player) == "player") then if (getElementData(player, dataToFindPlayersJob) == role or role == "ALL") then if isPedInVehicle(player) then return end local info= getElementData(source, "info") local skin= getElementData(source, "skins") triggerClientEvent(player, "jobsystem.showJobGUI", root, getElementData(source, "title"), skin, info) else exports["TopBarChat"]:sendClientMessage("This marker is allowed for only "..role.." group.", player, 255, 0, 0) end end end onPlayerAcceptJob = function(job, skin) setElementModel(client, skin) setElementData(client, "Occupation", job) exports["TopBarChat"]:sendClientMessage("You're working as "..job, client, 0, 255, 0) setPlayerNametagColor (client, getMarkerColor(marker)) local team = getElementData(source, "team") if getTeamName(team) == true then setPlayerTeam(client, team) end end addEvent("onPlayerAcceptJob", true) addEventHandler("onPlayerAcceptJob", root, onPlayerAcceptJob) I tried getTeamName and getTeamFromName.
  6. On edit box; For Max: I'll write "10", but will have one error because the max number is "9", not "10" For Min: I'll write "1", but will have another error because the min. number is "2", not "1"
  7. No, it don't work, I want only when I write $100001, will say is invalid, due is more than $100000 and for min: I'll write 48000 and will say it's invalid due is less than $50000
  8. Hello I have one question How I can check the number from editbox(Min and Max)? Example: If I put number 100001, won't accept, but if I put 100000 will accept (Max) Another Example: If I put number 49999, won't accept, but if I put number 50000 will accept (Min)
  9. Hassam

    change numbers

    No, didn't work, now when I put 1, this won't down, I don't know why.... And other thing, I want when arrive to 0 Minutes, set as In Progress Edit: I fixed the script
  10. MyTimerCarshow = setTimer( function () end , (Time*60*1000), 0) local MyMinutes, ExeC, TotC = getTimerDetails (MyTimerCarshow) local MyMinutesCarshow = MyMinutes/1000/60 setTimer( function () if (isTimer(MyTimerCarshow)) then guiSetText(GetTimeInfo, "In Progress") guiLabelSetColor(GetTimeInfo, 215, 255, 0) else guiSetText(GetTimeInfo, math.floor(MyMinutesCarshow).." Minutes") guiLabelSetColor(GetTimeInfo, 0, 255, 0) end end, 50, 0) Hello, I'm posting here because I need help, where I'm trying do one gui, where the minutes pass only on gui Example: Label: 1Minutes Label: In Progress The problem is when I put 2, will be auto-set "In Progress".
  11. I know it but I didn't understand that. I need someone to explain that.
  12. Thanks for helping me Another question, isn't about that, Someone can explain to convert the numbers like that 100000 to 100.000? https://wiki.multitheftauto.com/wiki/ConvertNumber I saw that but I didn't understand so much, like I put that. guiSetText(MoneyPrize3Info, print(convertNumber(Prize3))) It's a label.
  13. Hello, I'm here to ask something, I have one script, where I have edit box, but I want put that edit box write only numerics, not anothers lenghts. I like that, but only numbers.
  14. It's great idea, and I can add Armor + health to same management system, thanks for suggest this, I will script this soon
  15. Hello fellow, I'm posting here due I'm selling the system of health/Armor/gangbases. I will explain: Gangbases - I created this due some groups of server want build one base and put on server, so I made this script. Health - Maybe pay a little more, but the health marker can be created on base, so this, I made one script you enter on pickup and you will need pay 1,000 to put 200% of health Armor - Same Health, but you will need pay 2,000 to 100% of armor Script prices: Gangbases - 9€ Health - 3€ Armor 3€ total - 9 + 3 +3 = 15€ If you want buy, say me here. Images: Gangbase with gates http://imgur.com/lmhFPH0 http://imgur.com/vKQTCmQ Healht http://imgur.com/eOZamYK Armor http://imgur.com/aaB56Q5
  16. No problem Solidsnake, I like some opinions from scripters.
  17. Well, I created one function can be used for all, will call "All"(on group), and other feature is only these members can use the markers. Edit: I add too one team feature, and can be used for all (all guys in group) and can be used for restrictive jobs. SS of the function: http://imgur.com/vbubSde
  18. No, can create this from only edit one part, like gate system, made by me. https://forum.multitheftauto.com/viewtopic.php?f=108&t=62845&sid=157856146230c75f69843e486a34bdb7 Second image
  19. Hello fellow, I'm selling the script vehicles spawn with price 10€. If you want, contact me to buy the vehicle spawner. Describe: You had one part is only for put the information a to put the markers + rotation of vehicles + who will use + vehicles. Thanks for read, Hassam
  20. Hassam

    Error

    Yes, but I found the problems, anyways, thanks for help
  21. Hassam

    Error

    Hello, I'm posting here because i can't spawn one car, look at this vehicle = {} function SpawnVehicle(vid, vx, vy, vz, rotation, r, g, b, r2, g2, b2) if (isElement(vehicle[client])) then destroyElement(vehicle[client]) end vehicle[client] = createVehicle(vid, vx, vy, vz, 0, 0, rotation) if (vehicle[client]) then setVehicleColor(vehicle[client], r, g, b, r2, g2, b2) end warpPedIntoVehicle(client, vehicle[client]) setElementData(vehicle[client], "jobvehicle", true) end addEvent("SpawnVehicle", true) addEventHandler("SpawnVehicle", root, SpawnVehicle)
  22. So I can use this, right? -- client side: local myTable = { } setTimer ( triggerServerEvent, 10000, 0, "updateServerTable", localPlayer, myTable ) -- server side: local myTable = { } addEvent ( "updateServerTable", true ) addEventHandler ( "updateServerTable", root, function ( theTable ) myTable = theTable end ) From Server side to client side
  23. Hello fellow scripters, I'm creating this topic due I had a question, if is possible make one table from server-side and copy to client-side? If yes, how I can do this? Thanks for read, Hassam.
×
×
  • Create New...