Jump to content

illestiraqi

Members
  • Posts

    256
  • Joined

  • Last visited

Everything posted by illestiraqi

  1. When I try spawning a vehicle the gui comes up I select the vehicle and gives me this error: [2013-04-01 20:32:45] WARNING: rpg-gangcar\veh.slua:45: Bad argument @ 'getElementData' [Expected element at argument 1, got nil] [2013-04-01 20:32:45] ERROR: rpg-gangcar\veh.slua:46: attempt to index local 'data' (a boolean value)
  2. The file name for the script is rpg-gangcar shows this: WARNING: Loading script failed: rpg-gangcar/veh.clua:13: unexpected symbol near "!"
  3. Whats the command I dont know how to debug?
  4. Somethings wrong because the gui wont open?
  5. I know this isnt mine but I'm aloud to add towards it but now it isnt working. Seriously think smart.
  6. Please help me fix. Really needed.
  7. I don't know how to add this thats why i posted the script here.
  8. No no no. The cars already spawn north I want it to spawn south, east, west too not just north.
  9. I cant do it can I atleast have help I want this to be fixed only and this will help my server by 50% please.
  10. When I change rotation for configuration.slua, it doesent rotate the vehicle just stays north please help me fix it because I want change it maybe south or west or east not only north. Server: 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) 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) Client: local screenWidth, screenHeight = guiGetScreenSize() local v_table = {} function createVehicleChooserGUI() if (isElement(wndVehicle)) then if (guiGetVisible(wndVehicle)) then return end end windowWidth, windowHeight = 321, 338 windowX, windowY = (screenWidth / 2) - (windowWidth / 2), (screenHeight / 2) - (windowHeight / 2) wndVehicle = guiCreateWindow(windowX, windowY, windowWidth, windowHeight, "Select Vehicle",false) guiSetAlpha(wndVehicle, 1) gridVehicle = guiCreateGridList(9,23,303,249,false,wndVehicle) vehicleColumn = guiGridListAddColumn(gridVehicle,"Vehicle",0.-- s8) --> vehicleSpawn = guiCreateButton(9,282,96,37,"Select",false,wndVehicle) vehicleClose = guiCreateButton(216,282,96,37,"Exit",false,wndVehicle) addEventHandler("onClientGUIClick", vehicleSpawn, onPlayerSelectVehicle) addEventHandler("onClientGUIClick", vehicleClose, onPlayerExitVehicleGUI) end function showVehicleGUI(vehicles, rotation, posX, posY, posZ, rotation, r, g, b) createVehicleChooserGUI() v_table[1] = posX v_table[2] = posY v_table[3] = posZ v_table[4] = rotation v_table[5] = r v_table[6] = g v_table[7] = b showCursor(true) guiGridListClear(gridVehicle) for index, vehicles in ipairs(vehicles) do vehicleRow = guiGridListAddRow(gridVehicle) guiGridListSetItemText(gridVehicle, vehicleRow, vehicleColumn, getVehicleNameFromModel(vehicles), false, true) end end addEvent("jobvehicles.showVehicleGUI", true) addEventHandler("jobvehicles.showVehicleGUI", root, showVehicleGUI) function onPlayerExitVehicleGUI(button, state) if (button ~= "left" or state ~= "up") then return end guiSetVisible(wndVehicle, false) showCursor(false) end function onPlayerSelectVehicle(button, state) if (button ~= "left" or state ~= "up") then return end if (guiGridListGetSelectedItem(gridVehicle) == -1) then return end local vrow = guiGridListGetSelectedItem(gridVehicle) local vname = guiGridListGetItemText(gridVehicle, vrow, vehicleColumn) local vid = getVehicleModelFromName(vname) guiSetVisible(wndVehicle, false) showCursor(false) triggerServerEvent("jobvehicles.onPlayerSpawnVehicle", root, vid, v_table[1], v_table[2], v_table[3], v_table[4], v_table[5], v_table[6], v_table[7]) end
  11. This is my scripts and every team puts clan moves to NFS Please help fix. ---------------do not change or touch this---------- Names={} Tags={} Colors={} ACL={} -------------------------------------------------------------- ---------------------------here put your clans read readme for instructions--------------------------------------- local names ={"Guest Team","Ultra Pro Skills Staff","|High Class|","NFS Team"} local tags ={"","~UpS~","|HC|","[NFS]"} local colors ={"#e6e6e6","#ff6600","#32ffcc","#cc0000"} local acls ={"none","none","none","none"} -------- load------------ function loadTeams() for i,name in pairs(names) do Names[i]=name end for i,tag in pairs(tags) do Tags[i]=tag end for i,color in pairs(colors) do Colors[i] = color end for i,acl in pairs(acls) do ACL[i] = acl end end addEventHandler("onResourceStart",getRootElement(),loadTeams) --------------------------------------------------- ----- move on start------------------ function moveOnStart() for i,player in pairs(getElementsByType("player")) do check(player) end end addEventHandler("onResourceStart",getRootElement(),moveOnStart) ------------------------------------------------------------------------- -----------check---------------------------- function check (player) setPlayerTeam(player,nil) for i,tag in pairs(tags) do if string.find(getPlayerName(player),tag) then local account=getPlayerAccount(player) if ACL[i]~="none" and not isObjectInACLGroup ( "user." ..getAccountName(account) , aclGetGroup ( ACL[i] ) ) then return end local name = Names[i] local color = Colors[i] if not getTeamFromName(name) then createTeam(name,getColorFromString(color)) end local team = getTeamFromName(name) setPlayerTeam(player,team) end end end -------------------------------- ----------remove Empty Team ---------- function remove() for t,teams in pairs(names) do local team = getTeamFromName(teams) if team then if countPlayersInTeam ( team )==0 then destroyElement(team) end end end end ----------------------------------------------------- -------NickChange------------- function nick(old,new) setTimer(check,1000,1,source) setTimer(remove,1500,1) end addEventHandler("onPlayerChangeNick",getRootElement(),nick) --------------------------------------------- -------Join-------------------------------- function join() setTimer(check,4000,1,source) end addEventHandler("onPlayerJoin",getRootElement(),join) ------------------------------- ---------Quit--------------------- function quit(player) setTimer(remove,1000,1) end addEventHandler("onPlayerQuit",getRootElement(),quit) ------------------------------------ ---------Login--------------------- function login() setTimer(check,1000,1,source) setTimer(remove,1500,1) end addEventHandler("onPlayerLogin",getRootElement(),login) ------------------------------------ ---------Logout--------------------- function logout() setTimer(check,1000,1,source) setTimer(remove,1500,1) end addEventHandler("onPlayerLogout",getRootElement(),logout) ------------------------------------ ----------blip-------------- function blip(player) local team = getPlayerTeam(player) if team then for v,blip in pairs(getAttachedElements(player)) do if getElementType(blip)=="blip" then local r,g,b =getTeamColor(team) setBlipColor(blip,r,g,b,255) setVehicleColor ( blip,r,g,b) end end end end function timer() setTimer(blip,3000,1,source) end addEventHandler("onPlayerSpawn",getRootElement(),timer) addEvent ( 'onPlayerPickUpRacePickup', true ) function zaa ( id, type, model ) if ( getPlayerTeam ( source ) ) then if ( eventName == 'onPlayerPickUpRacePickup' and id == 'vehiclechange' or id == 'repair' or id == 'nitro' ) then local r, g, b = getTeamColor ( getPlayerTeam ( source ) ) local vehicle = getPedOccupiedVehicle(source) setVehicleColor ( vehicle, r, g, b ); else local r, g, b = getTeamColor ( getPlayerTeam ( source ) ) local vehicle = getPedOccupiedVehicle(source) setVehicleColor ( vehicle, r, g, b ) end end end addEventHandler ( 'onPlayerVehicleEnter', root, zaa ) addEventHandler ( 'onPlayerPickUpRacePickup', root, zaa )
  12. Here in my server hosting... when i logonto my server it gives me black screen and thats all when i go to admin panel i start a dm map and in my server host it gives me this.
  13. I am not looking for exacly the same panel... but Im looking for something similar like I add my files or link to youtube link what ever kind of those but music panel please someone
  14. I'm sorry for triple post but I SERIOUSLY need this script fixed please help me.
  15. Can't i make it like you must do command to have custom skin? (id 300)
  16. Please help this is really needed.
  17. Thats the one i tried but idk how it works how long to stand in there any stuff... not to good information...
  18. I have currently made a topic about this but wasn't resolved and was deleted I think but back to the topic... I want a custom skin like as you can see San Andreas Skins end at ID 299 and I was wondering if theres a way to add for example id 300 and I place my own DFF and TXD skin please help.
  19. I can host the server on my pc but for a fair price.
  20. Can you give me code if you dont mind and if not i understand.
  21. Hey if you guys can help me in this resource: https://community.multitheftauto.com/index.php?p= ... ls&id=5606 the turfs arent connected to any gangs or anything so I want it to work with Castillo's gang system whenever they capture turf it changes to the gang made color. any thing needed like server or client side just ask because i dont know witch to put.
  22. illestiraqi

    asdasd

    and that is something i dont have mind giving me the best one or maybe yours if you got one?
  23. illestiraqi

    asdasd

    I've made a couple others but I lost them and can't access them anymore OH, I found the druglab resource which was/is mainly used on S2 I believe, it can be downloaded here: https://community.multitheftauto.com/in ... ls&id=6786 And how does this work because I only go on S1 not 2.
  24. Correct, but how do i change color? EDIT: Nvm got it thank you so much but another problem... when map is travelling it shows Travelling to: (Green Color) and Author: (Green Color) how do i change that? 2nd EDIT: Nvm Got it again
  25. Hey all I am using a different gamemode of race but still same thing of DM but theres a problem in the picture below it shows green color is there any way i can change it to hex color #ff6600? Please tell me what file and what line plz I checked and couldn't find.
×
×
  • Create New...