Jump to content

berry172

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by berry172

  1. not work! Bugged script :SSS please help not work
  2. for example? exports.global:giveMoney(client, match.random:600) ?
  3. exports.global:giveMoney(client, 600) How to set random money?
  4. exports.global:sendLocalMeAction(source, "dasdw4142 line") outputChatBox("ds421515151 line", 255, 194, 15, true) how to color? #B81113 does not work
  5. berry172

    Goto pos

    Hy all! goto pos x,y,z command? example: /gotopos 1000.5 , 1251.7 , 2412.5 thank
  6. function createCivilianPermVehicle(thePlayer, commandName, ...) if (exports.global:isPlayerSuperAdmin(thePlayer)) then local args = {...} if (#args < 10) then outputChatBox("HASZNÁLD: /" .. commandName .. " [id/név] [szin1 (-1 = random)] [szin2 (-1 = random)] [Munka ID -1 = nem munka jármû]", thePlayer, 255, 194, 14) outputChatBox("MUNKA ID 1 = Csomagszállító", thePlayer, 255, 194, 14) outputChatBox("MUNKA ID 2 = Taxi sofőr", thePlayer, 255, 194, 14) outputChatBox("MUNKA ID 3 = Busz sofőr", thePlayer, 255, 194, 14) outputChatBox("MUNKA ID 8 = Farmer", thePlayer, 255, 194, 14) else local vehicleID = tonumber(args[1]) local col1, col2, job if not vehicleID then -- vehicle is specified as name local vehicleEnd = 1 repeat vehicleID = getVehicleModelFromName(table.concat(args, " ", 1, vehicleEnd)) vehicleEnd = vehicleEnd + 1 until vehicleID or vehicleEnd == #args if vehicleEnd == #args then outputChatBox("Érvénytelen jármû név.", thePlayer, 255, 0, 0) return else col1 = tonumber(args[vehicleEnd]) col2 = tonumber(args[vehicleEnd + 1]) job = tonumber(args[vehicleEnd + 2]) end else col1 = tonumber(args[2]) col2 = tonumber(args[3]) job = tonumber(args[4]) end local id = vehicleID local r = getPedRotation(thePlayer) local x, y, z = getElementPosition(thePlayer) x = x + ( ( math.cos ( math.rad ( r ) ) ) * 5 ) y = y + ( ( math.sin ( math.rad ( r ) ) ) * 5 ) local letter1 = string.char(math.random(65,90)) local letter2 = string.char(math.random(65,90)) local plate = letter1 .. letter2 .. math.random(0, 9) .. " " .. math.random(1000, 9999) local veh = createVehicle(id, x, y, z, 0, 0, r, plate) if not (veh) then outputChatBox("Érvénytelen jármû ID.", thePlayer, 255, 0, 0) else exports['anticheat-system']:changeProtectedElementDataEx(veh, "fuel", 100) exports['anticheat-system']:changeProtectedElementDataEx(veh, "handbrake", 0, false) exports['vehicle-mods-handling']:LoadHandling(veh) if (job>0) then toggleVehicleRespawn(veh, true) setVehicleRespawnDelay(veh, 60000) setVehicleIdleRespawnDelay(veh, 180000) end local rx, ry, rz = getVehicleRotation(veh) setVehicleRespawnPosition(veh, x, y, z, rx, ry, rz) exports['anticheat-system']:changeProtectedElementDataEx(veh, "respawnposition", {x, y, z, rx, ry, rz}, false) setVehicleLocked(veh, false) setVehicleColor(veh, col1, col2, col1, col2) setVehicleOverrideLights(veh, 1) setVehicleEngineState(veh, false) setVehicleFuelTankExplodable(veh, false) local dimension = getElementDimension(thePlayer) local interior = getElementInterior(thePlayer) exports['anticheat-system']:changeProtectedElementDataEx(veh, "dimension", dimension, false) exports['anticheat-system']:changeProtectedElementDataEx(veh, "interior", interior, false) exports['anticheat-system']:changeProtectedElementDataEx(veh, "job", job, job ~= 0) -- Set the vehicle armored if it is armored if (armoredCars[id]) then setVehicleDamageProof(veh, true) end local insertid = mysql:query_insert_free("INSERT INTO vehicles SET job='" .. mysql:escape_string(job) .. "', model='" .. mysql:escape_string(id) .. "', x='" .. mysql:escape_string(x) .. "', y='" .. mysql:escape_string(y) .. "', z='" .. mysql:escape_string(z) .. "', rotx='" .. mysql:escape_string(rx) .. "', roty='" .. mysql:escape_string(ry) .. "', rotz='" .. mysql:escape_string(rz) .. "', color1='" .. mysql:escape_string(col1) .. "', color2='" .. mysql:escape_string(col2) .. "', faction='-1', owner='-2', plate='" .. mysql:escape_string(plate) .. "', currx='" .. mysql:escape_string(x) .. "', curry='" .. mysql:escape_string(y) .. "', currz='" .. mysql:escape_string(z) .. "', currrx='0', currry='0', currrz='" .. mysql:escape_string(r) .. "', interior='" .. mysql:escape_string(interior) .. "', currinterior='" .. mysql:escape_string(interior) .. "', dimension='" .. mysql:escape_string(dimension) .. "', currdimension='" .. mysql:escape_string(dimension) .. "'") if (insertid) then exports.pool:allocateElement(veh, insertid) exports['anticheat-system']:changeProtectedElementDataEx(veh, "dbid", insertid) exports['anticheat-system']:changeProtectedElementDataEx(veh, "fuel", 100) exports['anticheat-system']:changeProtectedElementDataEx(veh, "engine", 0, false) exports['anticheat-system']:changeProtectedElementDataEx(veh, "oldx", x, false) exports['anticheat-system']:changeProtectedElementDataEx(veh, "oldy", y, false) exports['anticheat-system']:changeProtectedElementDataEx(veh, "oldz", z, false) exports['anticheat-system']:changeProtectedElementDataEx(veh, "faction", -1) exports['anticheat-system']:changeProtectedElementDataEx(veh, "owner", -2, false) exports['anticheat-system']:changeProtectedElementDataEx(veh, "job", job, job ~= 0) exports['anticheat-system']:changeProtectedElementDataEx(veh, "handbrake", 0, false) exports['anticheat-system']:changeProtectedElementDataEx(veh, "vehicle:windowstat", 0, true) outputChatBox(getVehicleName(veh) .. " (CIVIL) lespawnova (ID #" .. insertid .. ").", thePlayer, 255, 194, 14) exports.logs:logMessage("[MAKECIVVEH] " .. getPlayerName( thePlayer ) .. " created car #" .. insertid .. " (" .. getVehicleNameFromModel( id ) .. ")", 9) exports['vehicle-interiors']:add( veh ) else destroyElement( veh ) end end end end end addCommandHandler("makecivveh", createCivilianPermVehicle, false, false) What is the problem? /makecivveh tractor 0 0 8 (8 ID is not work) please help me
  7. http://www.creativerpg.net/s_trucker_job.lua http://www.creativerpg.net/c_trucker_job.lua Hello all! How to create new job on this basis? Trucker job copy & new job how to create? Please help me & upload new job... thanks
  8. Warnings: [2012-08-27 05:00:29] WARNING: faction-system\s_faction_system.lua:1024: Bad argument @ 'getElementData' [Expected element at argument 1, got boolean] [2012-08-27 05:16:29] INFO: WORLDSAVE INCOMING Line 1024: local govAmount = tonumber(getElementData(nav,"money")) or 0 What is the problem guys?
  9. function giveFamerozasMoney(vehicle) outputChatBox("Kerestél " .. ( farmerwage[vehicle] or 0 ) .. "Ft a fuvar(ok) során.", source, 255, 194, 15) exports.global:giveMoney(source, farmerwage[vehicle] or 0) farmerruns[vehicle] = 0 farmerwage[vehicle] = 0 -- respawn the vehicle exports['anticheat-system']:changeProtectedElementDataEx(source, "realinvehicle", 0, false) removePedFromVehicle(source, vehicle) respawnVehicle(vehicle) setVehicleLocked(vehicle, false) setElementVelocity(vehicle,0,0,0) end addEvent("giveFarmerozasMoney", true) addEventHandler("giveFarmerozasMoney", getRootElement(), giveFarmerozasMoney)
  10. Line: addEventHandler("giveFarmerozasMoney", getRootElement(), giveFarmerozasMoney) Warning [2012-08-26 13:16:27] WARNING: job-system\farmer\s_farmer_job.lua:23: Bad argument @ 'addEventHandler' [Expected function at argument 3, got nil] help me please
  11. [2012-08-26 11:55:12] Resource 'zene' changed, reloading and starting [2012-08-26 11:55:12] Not starting resource zene as section in the meta.xml is incorrect or missing (expected at least client 1.3.0-9.04134 because of 'setWorldSoundEnabled') [2012-08-26 11:55:12] start: Failed to start resource 'zene'
  12. How to delete default sound on alhambra?
  13. berry172

    Ped kill...

    what must i do,that nobady can kill with knife peds because with knife can they kill it?
  14. Use onClientResourceStart. Because it will say Event not added clientside if you're using onPlayerJoin event to trigger something (If the files aren't downloaded) local sounds = {"sounds/1.wav", "sounds/2.wav"} addEventHandler("onClientResourceStart", resourceRoot, function() playSound(sounds[math.random(1, #sounds)], false) end ) how to url playsound?
  15. Hello! How to create random playsound connect script?
  16. addEventHandler( 'onClientResourceStart', resourceRoot, function( ) local uSound = playSound3D( 'http://79.172.241.237:8200/2000.mp3', 1836.5478515625, -1682.2998046875, 13.343364715576) local uSound = playSound3D( 'http://79.172.241.237:8000/radio1.mp3', 487.890625, -14.0380859375, 1000.6796875 , 28) setSoundMaxDistance( uSound, 100 ) end ) Dimension 18 is not playing... What is the problem?
  17. bEditChar = guiCreateButton(0.05, 0.875, 0.9, 0.05, "Line asdasdasdasdas242142", true, tabCharacter) How to set color green?
  18. Hello, How do I change the color of the font? Lua scripting..
  19. Hello! It would be a problem that can't be written into the dialog-s only if I open the console. Could anyone help to solve the problem? Vallhalla basic method I use. The reward finance helpers. Thanks! Berry172
  20. Account system: how to fix? Admin system: Second line to remove?
  21. Hello, warning & errors: [2012-08-15 12:22:33] ERROR: account-system\s_account_system.lua:94: attempt to index local 'motdresult' (a nil value) [2012-08-15 12:22:34] SCRIPT ERROR: admin-system\Resources\s_resource_commands.lua:2: 'then' expected near ')' [2012-08-15 12:22:34] WARNING: Loading script failed: admin-system\Resources\s_resource_commands.lua:2: 'then' expected near ')' How to fix? Lines: Account system 94: exports['anticheat-system']:changeProtectedElementDataEx(getRootElement(), "account:motd", motdresult["value" ], false ) Admin system: if (exports.global:isPlayerScripter(thePlayer) or getElementData(thePlayer, "adminlevel") >= 5)) then Fast please :SS
  22. Hy, please help me!i'm need tutorial.
  23. Hello! MYSQL error is : MySQL Error 1054: Unknown column 'thread.threadid' in 'on clause' s_mysql.lua: username = get( "root" ) or "root" password = get( "asd" ) or "asd" db = get( "mta" ) or "mta" host = get( "127.0.0.1" ) or "127.0.0.1" port = tonumber( get( "3306" ) ) or 3306 connection.lua: -- connection settings local hostname = get( "hostname" ) or "127.0.0.1" local username = get( "username" ) or "root" local password = get( "password" ) or "asd" local database = get( "database" ) or "mta" local port = tonumber( get( "port" ) ) or 3306 settings.xml: <settings> <setting name="@mysql.username" value="root"/> <setting name="@mysql.password" value="asd"/> <setting name="@mysql.database" value="mta"/> <setting name="@mysql.hostname" value="127.0.0.1"/> <setting name="@mysql.port" value="3306"/> </settings> Please help me! I'm using mta_mysql.dll ))
×
×
  • Create New...