
Apo
Members-
Posts
141 -
Joined
-
Last visited
Everything posted by Apo
-
hi in need name player jaked function vehicleExitJack ( thePlayer, seat, jacked ) if jacked then outputChatBox("" .. getPlayerName(thePlayer) .. " has been jaked by " .. getPlayerName(jacked ) .. ".") end end addEventHandler ( "onVehicleExit", getRootElement(), vehicleExitJack )
-
hi please help me for setelemntdata error test\s_test.lua:8 attempt to compare nill with number. local hillArea = createColRectangle ( -1426.3505859375, 928, 4.5, 6 ) setElementInterior(hillArea,0) setElementDimension(hillArea,0) function hill_Enter ( thePlayer ) local numberplayerjoinls = tonumber(getElementData(hillArea,"numberplayerjoinls")) if getElementType ( thePlayer ) == "player" then if numberplayerjoinls <= 20 then setposplayer(thePlayer) setElementData (hillArea,"numberplayerjoinls",numberplayerjoinls+1,true) end end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) function setposplayer(thePlayer) detachElements(thePlayer) toggleAllControls(thePlayer, false, true, false) setElementFrozen(thePlayer, true) setElementPosition(thePlayer,-1475.0888671875, 1008.59765625, 1027.0341796875) outputChatBox ( "entered the zone!", thePlayer, 255, 255, 109 ) end
-
hi please help me for fix my error and warning [2016-08-10 15:07:48] WARNING: account section in the meta.xml is incorrect or missing (expected at least server 1.5.2-9.07903 because of 'account.luac') [2016-08-10 15:07:48] WARNING: account requires upgrade as section in the meta.xml is incorrect or missing (expected at least server 1.5.2-9.07903 because of 'account.luac') [2016-08-10 15:07:48] Use the 'upgrade' command to perform a basic upgrade of resources. [2016-08-10 15:07:48] ERROR: account\account.luac:1: exports: Call to non-running server resource (mysql) [string "?"]
-
how to active bindkey and command in the faction function getup(thePlayer) if getElementData( thePlayer, "sleep") == "activated" then setPedAnimation( thePlayer, nil, nil ) outputChatBox( "Sleeping Mode: Off!", thePlayer, 255, 0, 0 ) setElementData( thePlayer, "sleep", "deactivated" ) toggleControl( thePlayer, "forward", true ) toggleControl( thePlayer, "jump", true ) toggleControl( thePlayer, "aim_weapon", true ) toggleControl( thePlayer, "fire", true ) else outputChatBox( "You aren't sleeping!", thePlayer, 255, 0, 0 ) end end addCommandHandler( "getup", getup )
-
hi how to disabel(cancel) all command or command name( "heal" and "stat" and "dance" etc ...) in the faction sleep function sleep(thePlayer) local phealth = getElementHealth( thePlayer ) if ( phealth < 100 ) then if not isPedInVehicle( thePlayer ) then if getElementData( thePlayer, "sleep" ) ~= "activated" then setPedAnimation( thePlayer, "CRACK", "crckidle2", -1, true, false, true ) outputChatBox( "Sleeping Mode: On!", thePlayer, 255, 255, 0 ) setElementData( thePlayer, "sleep", "activated" ) toggleControl( thePlayer, "forward", false ) toggleControl( thePlayer, "jump", false ) toggleControl( thePlayer, "aim_weapon", false ) toggleControl( thePlayer, "fire", false ) else outputChatBox( "You can't sleep while sleeping O_o", thePlayer, 255, 0, 0 ) end else outputChatBox( "You can't sleep in a vehicle!", thePlayer, 255, 0, 0 ) end else outputChatBox( "You can't sleep while your health is full!", thePlayer, 255, 0, 0 ) end end addCommandHandler( "sleep", sleep )
-
no how to false function int other function for example: function checkAFKPlayers() for index, thePlayer in ipairs(getElementsByType("player"))do if (getPlayerIdleTime(thePlayer) > 300000) then kickPlayer(thePlayer, "Idle for 5 minutes") end end end setTimer(checkAFKPlayers, 30000, 0) - how to make new function for cancel or false function checkafkplayer
-
لاالله الا الله
-
For example, you change the password for the forum when you're writing new code , the dots or star was to show And those around you are able to see the code written on the page are not displayed when i am type the changepass my pass msked I would not even be able to see new password function ChangePlayerPassword(player, command, oldpass, newpass) -- get the account the player is currently logged into local account = getPlayerAccount(player) if (account) then -- if its only a guest account, do not allow the password to be changed if (isGuestAccount(account)) then outputChatBox("You must be logged into an account to change your password.", player) -- end the function return end -- check that the old password is correct local password_check = getAccount(getAccountName(account), oldpass) if (password_check) then -- check the length of the new password if (string.len(newpass)>=5) then setAccountPassword(account,newpass) else outputChatBox("Your new password must be at least 5 characters long.", player) end else outputChatBox("Old password invalid.", player) end end end addCommandHandler("changepass", ChangePlayerPassword)
-
my code not work local resourcesToWaitFor = { "admin","account" } local waitingForResources = {} local doShutdown = false addCommandHandler("safeshutdown", function(thePlayer) outputChatBox("Safely shutting down the server...") for k, resourceName in ipairs(resourcesToWaitFor) do local resource = getResourceFromName(resourceName) if(resource)then waitingForResources[resource] = true end end doShutdown = true for resource, resourceWaitState in pairs(waitingForResources) do stopResource(resource) end end, true, false) addEventHandler("onResourceStop", root, function(stoppedResource) if(doShutdown and waitingForResources[stoppedResource])then waitingForResources[stoppedResource] = false for resource, resourceState in pairs(waitingForResources) do if(resourceWaitState)then return false end end shutdown("The server has safely been shutdown.") end end)
-
hi plese help me for fix my error WARNING: passowrds\passowrd.lua:1: Bad argument @ 'md5' [Expected string at argument 1, got nil] ERROR: passowrds\passowrd.lua:1: bad argument #1 to 'lower' (string expected, got boolean) string.lower(md5(string.lower(md5(passowrd))..match))
-
hi please help me for fix my warning if (isElement(thePlayer)) then local attached = getElementAttachedTo ( source ) destroyElement(attached) destroyElement(source) attached = nil source = nil WARNING: newscript.lua:3: Bad argument @ 'getElementAttachedTo' [Expected element at argument 1, got nil] WARNING: newscript.lua:4: Bad argument @ 'destroyElement' [Expected element at argument 1, got boolean] WARNING: newscript.lua:5: Bad argument @ 'destroyElement' [Expected element at argument 1, got nil]
-
hi please help me for set timer for my command if player use the command timer active for 60 sec and player can not use command timer active only for player no for everyone function consoleCreateMarker ( playerSource ) if ( playerSource ) then local x, y, z = getElementPosition ( playerSource ) createMarker ( x, y, z, "checkpoint", 2, 255, 0, 0, 255 ) outputChatBox ( "You got a red marker", playerSource ) end end addCommandHandler ( "createmarker", consoleCreateMarker )