
rpgforlife
Members-
Posts
88 -
Joined
-
Last visited
Everything posted by rpgforlife
-
look if you want scripts, add me on skype ask for the resources and if i have them i send screenshots i dont ask for opinions of other people how they want to see it.
-
To lazy to make screens of all scripts if you want some screens of scripts i can send them om skype
-
Do you need RPG resource for a low price? Contact me then skype: jordyklabbers
-
(Y)
-
Anyone else how to fix it, its still not fixed
-
fixed, srry for this topic now
-
i have an problem. when i spawn as cop for example i have a blip with blue color but when i reconnect the blip don't comes back. How to fix this ;o? i tried many things
-
I have a problem with my "bankrob" safe elseif theDoor == "Safe1" then setWantedLevel(source, safe1) outputChatBox("*911* Safe 1 is open of the bankrob in Whetstone!",0,255,0) destroyElement(Safe1marker) for i,p in ipairs(getElementsWithinColShape("player")) do local account = getPlayerAccount(p) if getAccountData(account, "gang") then r,g,b = getPlayerNametagColor(p) givePlayerMoney(p, math.random(50000,70000)) end end but it doesn't take the gang to give the money (function name is) : function(theDoor) errors: WARNING: saverob\saverob_server.lua:181: Bad argument @ 'getAccountData' [expected account at argument 1, got boolean] WARNING: saverob\saverob_server.lua:13: Bad agrument @ 'unbindKey' [Expected string at argument 3, got function]
-
Hello, I took a script from community: https://community.multitheftauto.com/index.php?p=resources&s=details&id=546 its gave me this error WARNING: Database\database.lua:37: Database connection not closed. No connection or connection corrupted ERROR: Database\database.lua:16: attempt to call global 'mysql_connect' (a nil value) Means this that my settings are fault ?
-
rpg
-
Can anyone make a script for me that saves stars after quit/join i tried every save script on community but it doesn't work exports must be something like: exports.police:setWantedLevel feel free to leave a comment below Regards, RPGFORLIFE
-
Does anyone have an ingame script complider so i don't need to do every server side of my script to complide single on the internet. regards,
-
I need this kind of lines in the script to respawn the occopied cars into the save disk -[[elseif getElementData(v, "personalVehicle") then exports.Mylifehousing:vehicleRecache(v)]]-- it doesn't respawn in the save disk if i use that code from yours
-
it works but now the part with : -[[elseif getElementData(v, "personalVehicle") then exports.Mylifehousing:vehicleRecache(v)]]-- doesn't work
-
Why does all my cars destroyed when i want to respawn them? I want to respawn them, not to destroy them totally There are no errors in debugscript script respawnlock = false addEventHandler("onResourceStart", resourceRoot, function() mainTimer = setTimer(respawnVehicles, 900000, 0) end) function respawnVehicles() if not respawnlock then respawnlock = true exports.command:sendMessage("Respawning all unoccupied vehicles in 30 seconds!", 0, 255, 0, root) setTimer ( function(msg, target, r, g, b) exports.command:sendMessage(msg, r, g, b, target) end , 10000, 1, "Respawning all unoccupied vehicles in 20 seconds!", getRootElement(), 0, 255, 0 ) setTimer ( function(msg, target, r, g, b) exports.command:sendMessage(msg, r, g, b, target) end, 20000, 1, "Respawning all unoccupied vehicles in 10 seconds!", getRootElement(), 0, 255, 0 ) setTimer ( function(msg, target, r, g, b) exports.command:sendMessage(msg, r, g, b, target) end, 25000, 1, "Respawning all unoccupied vehicles in 5 seconds!", getRootElement(), 0, 255, 0 ) setTimer ( vehrestask, 30000, 1) resetTimer(mainTimer) end end function respawnCommand(player) if not respawnlock then local accName = getAccountName(getPlayerAccount(player)) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- Does he have access to Admin functions? respawnVehicles() end else exports.command:sendMessage("*vehicles* Wait for the current respawn to end!", 0, 255, 0, player) end end addCommandHandler("vehiclerespawn", respawnCommand) function vehrestask() local resVehicles = getElementsByType("vehicle") for i,v in ipairs(resVehicles) do local occupants = getVehicleOccupants(v) -- Get all vehicle occupants local occupied = false if occupants then for seat, occupant in pairs(occupants) do if occupant then occupied = true break end end end if getVehicleController(v) then occupied = true end if not occupied then if getElementID(getElementParent(getElementParent(v))) ~= "Admin" then respawn = respawnVehicle(v) if not respawn then destroyElement(v) else destroyElement(v) end --[[elseif getElementData(v, "personalVehicle") then exports.housing:vehicleRecache(v)]]-- else if not getElementData(v, "personalVehicleID") then destroyElement(v) end end end end if getResourceState(getResourceFromName("publicvehicles")) == "running" then exports.publicvehicles:spawnPublicCars() end exports.command:sendMessage("All unoccupied vehicles have been respawned!", 0, 255, 0, root) respawnlock = false end
-
This one works for me. Try it (its client side) imgW = 250 imgH = 90 function adminLogo() local players = getPlayersInTeam(getTeamFromName("Admin")) for i,player in ipairs(players) do if player ~= localPlayer then local cX, cY, cZ = getCameraMatrix() local hX, hY, hZ = getPedBonePosition(player, -- s8) --> hZ = hZ + 1.0 local pX,pY,pZ = getPedBonePosition(localPlayer, -- s8) --> pZ = pZ + 1.0 if getScreenFromWorldPosition(hX, hY, hZ) and isLineOfSightClear(cX,cY,cZ, pX,pY,pZ) then local sX, sY, sD = getScreenFromWorldPosition(hX, hY, hZ) local relative = (50 - sD) / 50 if relative > 0 then local iW = imgW * relative local iH = imgH * relative local iX = sX - (iW / 2) local iY = sY - (iH / 2) dxDrawImage(iX, iY, iW, iH, "admin.png") end end end end end addEventHandler("onClientRender", root, adminLogo)
-
Maybe you can add some more information like, - Whats kind of scripts - Whats kind of server do you make etc...............
-
I already fixed the problem of this
-
I am searching for a scripter that can fix my house system incl the banksystem of 50p. I want that if a player buy an house that it will be automaticlly getting of his bank amount. Send me a PM if you want to help me, if you want money for it we will talk about it then.
-
ERROR: banking\bankSQL.lua:194: attempt to compate numer with nil because the script i put here is just a little bit of the lua so see lua:194: as lua:18:
-
When i do the command to make houses and press H to open the panel i get the error: *SANS Housing Admin* An unexpected error occured. Please contact the HQ team with error number 1 who can fix this error for me please? commands = exports.SANScommand interiorIndex = {} interiorIndex["No Interior"] = 0 interiorIndex["Motel Room 1"] = 1 interiorIndex["Motel Room 2"] = 2 interiorIndex["Small Flat 1"] = 3 interiorIndex["Small Flat 2 "] = 4 interiorIndex["Small Flat 3"] = 5 interiorIndex["Small Flat 4"] = 6 interiorIndex["Small Flat 5"] = 7 interiorIndex["Single Storey House 1"] = 8 interiorIndex["Single Storey House 2"] = 9 interiorIndex["Single Storey House 3"] = 10 interiorIndex["Single Storey House 4 (Modern)"] = 11 interiorIndex["Single Storey House 5 (Modern)"] = 12 interiorIndex["Single Storey House 6 (Modern)"] = 13 interiorIndex["Single Storey House 7 (The Crack Den)"] = 14 interiorIndex["Single Storey House 8 (Ryders)"] = 15 interiorIndex["Medium House 1"] = 16 interiorIndex["Medium House 2"] = 17 interiorIndex["Medium House 3"] = 18 interiorIndex["Medium House 4 (Modern)"] = 19 interiorIndex["Medium House 5 (Carl Johnsons)"] = 20 interiorIndex["Medium House 6 (Colonel Fuhrbergers House)"] = 21 interiorIndex["Mansion 1"] = 22 interiorIndex["Mansion 2 (Madd Dogg's House)"] = 23 interiorIndex["Abandoned AC Tower"] = 24 typeIndex = {} typeIndex["House"] = 0 typeIndex["Business"] = 1 typeIndex["Save Icon"] = 2 db = exports.SANSdatabase function startHouseCreation(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup("user." ..accName, aclGetGroup("Admin")) then triggerClientEvent(thePlayer, "onStartHouseCreation", getRootElement(), thePlayer) end end addCommandHandler("ch", startHouseCreation) function attemptHouseCreation(name,address,housetype, interior, price,income, x,y,z, csx, csy, csz, csrx, csry, csrz) local accName = getAccountName(getPlayerAccount(source)) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- Does he have access to Admin functions? if name and address and housetype and interior and price and income and x and y and z and csx and csy and csz and csrx and csry and csrz then local typeint = typeIndex[housetype] or 0 local intint = interiorIndex[interior] or 0 local status = 1 if typeint == 2 then status = 0 end local queryResult = executeSQLQuery("INSERT INTO `housingdata`(`name`, `address`, `type`, `interior`, `intlock`, `owner`, `price`, `value`, `income`, `status`, `x`, `y`, `z`, `csX`, `csY`, `csZ`, `csrX`, `csrY`, `csrZ`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", name , address , typeint , intint , "0" , "SAHousing" , tonumber(price) , tonumber(price) , tonumber(income) , tonumber(status) , tonumber(x) , tonumber(y) , tonumber(z) , tonumber(csx) , tonumber(csy) , tonumber(csz) , tonumber(csrx) , tonumber(csry) , tonumber(csrz)) if queryResult then local houseIDquery = executeSQLQuery("SELECT last_insert_rowid() FROM `housingdata`") local houseID = tonumber(houseIDquery[1]["last_insert_rowid()"]) local houseIcon if typeint == 2 then houseIcon = createPickup(x, y, z, 3, 1277, 0) createBlipAttachedTo(houseIcon, 35, 2, 0, 0, 0, 255, 0, 250, getRootElement()) elseif typeint == 1 then houseIcon = createPickup(x, y, z, 3, 1273, 0) elseif typeint == 0 then houseIcon = createPickup(x, y, z, 3, 1273, 0) else return false end setElementID(houseIcon, "housing"..houseID) setElementData(houseIcon, "isHouse", true) setElementData(houseIcon, "ID", houseID) commands:sendMessage( "*House creation successful.", 0, 255, 0, source) else commands:sendMessage( "MySQL error: " .. db:errorMessage(), 255, 255, 0, source ) end else commands:sendMessage( "Missing variable.", 255, 255, 0, source ) end else outputChatBox( "You don't have permission.", 255, 0, 0, source ) end end addEvent("onCreateHouseAttempt", true) addEventHandler("onCreateHouseAttempt", root, attemptHouseCreation) --[[-- function commenceHousingEdit(houseIcon) if isElement(currentIcon) then if getElementData(currentIcon, "isHouse") then local houses = executeSQLQuery("SELECT * FROM `housingdata` WHERE `id` = ?", getElementData(currentIcon, "houseID")) if #houses == 1 then local houseData = houses[1] triggerClientEvent(source, "onDisplayHousingEditMenu", houseIcon, houseData) else exports.SANScommand:sendMessage("*SANS Housing Admin* An unexpected error occured. Please contact the HQ team with error number 1.",255,0,0, source) end else exports.SANScommand:sendMessage("*SANS Housing Admin* You're not in a houseicon.",255,0,0, source) end else exports.SANScommand:sendMessage("*SANS Housing Admin* You're not in a houseicon.",255,0,0, source) end end addEvent("onCommenceHousingEdit", true) addEventHandler("onCommenceHousingEdit", root, commenceHousingEdit)--]]--