illestiraqi
Members- 
                
Posts
256 - 
                
Joined
 - 
                
Last visited
 
Everything posted by illestiraqi
- 
	For this swat job I want it to be able for users only in the SWAT group using Castillo's gang system. Client: local marker = createMarker( 1288.5, -1642.0999755859, 12.5, "Cylinder", 1.8, 0, 0, 255, 255) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,170,"SWAT Team ") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,80,108,35,"Take job",false,windowjob) GUIEditor_Button[3] = guiCreateButton(22,120,108,35,"Quit Job",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,120,110,36,"Cancel",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(19,33,273,20,"Are you sure you want to take/leave this job?",false,windowjob) function SWATjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, SWATjob) function SWATjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SWATjobleave) function joinTeam() triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeTeam() triggerServerEvent("removeSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3] , removeTeam, false) function removeSWATWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSWATWindow, false) Server: createBlip ( 186.2998046875, 1938.2998046875, 16.8, 56 ) function createSWATTeam () SWATteam = createTeam ("SWAT", 0, 0, 70) end addEventHandler ("onResourceStart", resourceRoot, createSWATTeam) function joinSWAT() setPlayerTeam(source,SWATteam) setElementModel(source, 285) giveWeapon ( source, 3 ) playeraccount = getPlayerAccount( source ) setAccountData( playeraccount, "team", "Army", true ) outputChatBox("You are now SWAT.",source,0,0,255) end addEvent("setSWAT", true) addEventHandler("setSWAT",root,joinSWAT) function removeSWAT() setPlayerTeam(source, 0) playeraccount = getPlayerAccount(source) if getAccountData(playeraccount, "standardskin") == 0 then setElementModel(source, 0) else setElementModel(source,getAccountData(playeraccount,"standardskin")) end outputChatBox("You are now an unemployed.",source,255,0,0) end addEvent("removeSWAT", true) addEventHandler("removeSWAT",root,removeSWAT) function SWATJob ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) theSkin = getElementModel ( attacker ) if (attackerweapon == 3) and (loss > 2 ) and (theWL > 0) then if getTeamName( theTeam ) == "SWAT" or getTeamName( theTeam ) == "MF" or getTeamName( theTeam ) == "FBI" then setElementPosition (source, 4076.3999023438, -1788.5, 3.511967, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( "You have been jailed by "..theCop.. " for 10 seconds.", source ) local playeraccount = getPlayerAccount ( attacker ) givePlayerMoney (attacker, 100) setTimer ( setElementPosition, 10000, 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) setPlayerWantedLevel (source, 0) end end end end addEventHandler ("onPlayerDamage", getRootElement(), SWATJob)
 - 
	I've tried but just would face that 1 way and everytime i change it, it wouldnt move 1 Single bit!
 - 
	I've tried it, I've done 90, it faces the way in picture, I've done 180, same position. :L
 - 
	Can you tell me what line in [lua].
 - 
	Another problem please help I want the vehicle from looking at the picture to spawn Right side --> how do I do that please help me! Ok now I'm talking about this.
 - 
	Server Side: Now where do i change it please tell me? local vehicle = {} function isVehicleSpawned(vehicle) return getElementData(vehicle, "jobvehicle") end function doesPlayerHaveVehicleSpawned(player) if (isElement(vehicle[player])) then return true else return false end end function destroyVehicle(vehicle, player) if (isElement(vehicle[player])) then destroyElement(vehicle[player]) end end function createTheJobVehicles() for index, table in ipairs(vehicles) do marker = createMarker(table.x, table.y, table.z, "cylinder", 2, table.r, table.g, table.b) setElementData(marker, "vehiclemarker-role", table.Roles) setElementData(marker, "vehiclemarker-vehicles", table.vehicles) setElementData(marker, "vehiclemarker-rotation", table.rotation) vehicle[marker] = table.Roles local position = table.x..", "..table.y..", "..table.z..", "..", "..table.rotation local color = table.vehR..", "..table.vehG..", "..table.vehB..", " setElementData(marker, "vehiclemarker-position", position) setElementData(marker, "vehiclemarker-color", color) addEventHandler("onMarkerHit", marker, onPlayerVehicleMarkerHit) end end addEventHandler("onResourceStart", resourceRoot, createTheJobVehicles) function onPlayerVehicleMarkerHit(player) local role = getElementData(source, "vehiclemarker-role") local vehicles = getElementData(source, "vehiclemarker-vehicles") local rotation = getElementData(source, "vehiclemarker-rotation") if (getElementType(player) == "player") then if (getElementData(player, dataToFindPlayersJob) == role or role == "ALL") then if (isPedInVehicle(player)) then return end local position = getElementData(source, "vehiclemarker-position") local color = getElementData(source, "vehiclemarker-color") local posX, posY, posZ, rotation = unpack(split(position, ",")) local r, g, b = unpack(split(color, ",")) triggerClientEvent(player, "jobvehicles.showVehicleGUI", root, vehicles, rotation, posX, posY, posZ, rotation, r, g, b) else outputChatBox("This marker is reserved for '"..role.."'", player, 250, 0, 0) end end end function onPlayerSpawnVehicle(vid, vx, vy, vz, rotation, r, g, b) if (isElement(vehicle[client])) then destroyElement(vehicle[client]) end vehicle[client] = createVehicle(vid, vx, vy, vz) setElementData(vehicle[client], "jobvehicle", true) warpPedIntoVehicle(client, vehicle[client]) setElementRotation(vehicle[client], 0, 0, rotation) outputDebugString(getPlayerName(client).. " has spawned a '"..getVehicleNameFromModel(vid)) outputServerLog(getPlayerName(client).. " has spawned a '"..getVehicleNameFromModel(vid).."'") if (r) then setVehicleColor(vehicle[client], r, g, b) end end addEvent("jobvehicles.onPlayerSpawnVehicle", true) addEventHandler("jobvehicles.onPlayerSpawnVehicle", root, onPlayerSpawnVehicle) function destroyPlayerVehicle() if (isElement(vehicle[source])) then destroyElement(vehicle[source]) end end addEventHandler("onPlayerWasted", root, destroyPlayerVehicle) addEventHandler("onPlayerLogout", root, destroyPlayerVehicle) addEventHandler("onPlayerQuit", root, destroyPlayerVehicle) function destroyMyOwnVehicle(player) if (isElement(vehicle[player])) then outputChatBox("You have succesfully destroyed your "..getVehicleNameFromModel(getElementModel(vehicle[player])).."!", player, 0, 255, 10) destroyElement(vehicle[player]) elseif (not isElement(vehicle[player])) then outputChatBox("You currently do not have a job vehicle spawned to destroy!", player, 250, 0, 0) end end addCommandHandler("destroyv", destroyMyOwnVehicle) function destroyVehicleOnExplode() if (getElementData(source, "jobvehicle")) then destroyElement(source) end end addEventHandler("onVehicleExplode", root, destroyVehicleOnExplode) function onAdminDestroyJobVehicle(admin, cmd, target) local accountname = getAccountName(getPlayerAccount(admin)) if (hasObjectPermissionTo("user."..accountname, "function.kickPlayer") and target) then local player = getPlayerFromName(target) if (isElement(vehicle[player]) and player) then outputChatBox("You have destroyed "..getPlayerName(player).."' s "..getVehicleNameFromModel(getElementModel(vehicle[player])).." (jobvehicle)", admin, 0, 255, 10) outputChatBox(getPlayerName(admin).." has destroyed your "..getVehicleNameFromModel(getElementModel(vehicle[player])).." (jobvehicle)", player, 255, 10, 0) destroyElement(vehicle[player]) elseif (not isElement(vehicle[player]) and player) then outputChatBox(getPlayerName(player).. " does not currently have any job vehicle spawned.", admin, 255, 10, 0) else outputChatBox("The player do not exist!", admin, 250, 0, 0) end end end addCommandHandler("dv", onAdminDestroyJobVehicle)
 - 
	To how much, and in the configuration or server/client?
 - 
	Will you show me how? Another problem please help I want the vehicle from looking at the picture to spawn Right side --> how do I do that please help me!
 - 
	will I have to change: dataToFindPlayersJob = "gang" To: (on another script same thing but different file to make more sense is this correct? dataToFindPlayersJob = "team"
 - 
	ok thanks but something else. I want something else to. I want user only alowed to get the vehicle if there in the Team "Police"
 - 
	ok thanks it works, 1 more thing, how do I make another row of the thing below. {Roles = "FBI", vehicles = {427, 596}, x = 1592.8000488281, y = -1606.9000244141, z = 13.39999961853, rotation = 25, r = 250, g = 250, b = 250, vehR = 0, vehG = 0, vehB = 255}, I want to make another one idk how to do it.
 - 
	But in game when i try it, it says these vehicles are reserved for the "FBI" and I'm using your gang system can you help me atleast change it up because im using your gang system and i want this to work with your gang system.
 - 
	Uhm excuse me if your going to be trolling than get out of this section because atm your acting like a noob. Im just a beginner and people are always rude, like geez i can never have nice people to help me out.
 - 
	Please help me, sorry for double post but im waiting for reply.
 - 
	In the lua below, it says dataToFindPlayersJob, and I want that changed to player team, witch i don't know how to do, because it has hard, and below where it says Roles = "FBI" thats for the team so someone please change this to team please and if server or client side needed just ask, thank you ------------------------------------------------------------------------------------ -- PROJECT: N/A -- DEVELOPERS: Sebbe -- RIGHTS: All rights reserved by developers ------------------------------------------------------------------------------------ dataToFindPlayersJob = "Occupation" vehicles = { {Roles = "FBI", vehicles = {427, 596}, x = 1592.8000488281, y = -1606.9000244141, z = 13.39999961853, rotation = 25, r = 250, g = 250, b = 250, vehR = 0, vehG = 0, vehB = 255}, } EDIT: If you'd like, I want the wiki thing that will or need to be used so I can atleast try myself please tell me them.
 - 
	
Help with Job Marker, Castillo's Gang System
illestiraqi replied to illestiraqi's topic in Scripting
not working please fix. - 
	I am using Castillo's gang system meaning I want this to all be changed into castillo's gang system thing. If player is in FBI gang than they are aloud to take this job and have the 286 skin. local Skinmarker = createMarker(919.59997558594, -1004.299987793, 37, "cylinder", 2, 33, 33, 33, 255) -- umkleide local theTeam = createTeam( "FBI", 31, 31, 31 ) addEventHandler("onMarkerHit", Skinmarker, function(hitElement) if getElementType(hitElement) ~= 'player' then return end if not(isFBI(hitElement)) then return end setElementModel(hitElement, 286) setPlayerTeam(hitElement, theTeam) end) function isFBI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "FBI" ) ) then return true; else return false; end end
 - 
	May I please have permission to use this script please?
 - 
	No because I actually was expecting the meta but actually didnt give it.
 - 
	No I actually asked an FFS member that was on an hour ago so he gave me it.
 - 
	Just the client file but the .yuv files are mine, like you said you can make name any to me on your server so i did and changed the file name inside the client lua, so please make meta. Btw this is the radar resource with nothing like only the "N" blip and thats all so if you dont know how to do meta please give me resource like it. P.S. the radar is transperency but has black outline to show as radar and has only "N" blip
 - 
	I need help with putting Meta.xml all together please help. Client: < Code removed > I got .yuv files for radar mod. in img folder so example: img/blip.yuv img: blip.yuv blipup.yuv local.yuv north.yuv radar.yuv
 - 
	Dude you totally missed the whole point, there's a reason why they were made separate. I want it fixed separate. I just need want someone to fix the staff job ONLY
 - 
	I made FBI job and perfectly fine working. I made staff and isn't working, ill show both FBI (Working Fine): local Skinmarker = createMarker(919.59997558594, -1004.299987793, 37, "cylinder", 1.0, 33, 33, 33, 255) -- umkleide local theTeam = createTeam( "FBI", 31, 31, 31 ) addEventHandler("onMarkerHit", Skinmarker, function(hitElement) if getElementType(hitElement) ~= 'player' then return end if not(isFBI(hitElement)) then return end setElementModel(hitElement, 286) setPlayerTeam(hitElement, theTeam) end) function isFBI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "FBI" ) ) then return true; else return false; end end Staff Job (Not Working Fix please) local Skinmarker = createMarker(1469, -1771.1999511719, 17.700000762939, "cylinder", 1.0, 109, 0, 164, 255) -- umkleide local theTeam = createTeam( "Staff", 109, 0, 164 ) addEventHandler("onMarkerHit", Skinmarker, function(hitElement) if getElementType(hitElement) ~= 'player' then return end if not(isSTAFF(hitElement)) then return end setElementModel(hitElement, 217) setPlayerTeam(hitElement, theTeam) end) function isSTAFF(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then return true; else return false; end end
 
