-
Posts
405 -
Joined
-
Last visited
Everything posted by Vision
-
onPlayerLogin is server-side.
-
function spawn ( ) spawnPlayer ( source, -1975, 885, 46, 0, 0 ) end addEventHandler("onPlayerLogin", root, spawn) addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() spawn(source) end )
-
function showPanel(thePlayer) triggerClientEvent(thePlayer, "openGUI", root) end function onResourceStart() for index, players in ipairs(getElementsByType("player")) do bindKey(players, "F4", "down", showPanel) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResourceStart) function onPlayerJoin() bindKey(source, "F4", "down", showPanel) end addEventHandler("onPlayerLogin", getRootElement(), onPlayerJoin) vehicles = { } addEvent("spawnVehicle", true ) addEventHandler("spawnVehicle", root, function ( vehID ) if ( isElement ( vehicles [ source ] ) ) then destroyElement ( vehicles [ source ] ) end vehicles [ source ] = createVehicle ( vehID, getElementPosition ( source ) ) if ( vehicles [ source ] ) then setVehicleColor ( vehicles [ source ], 255, 255, 255 ) end setTimer ( warpPedIntoVehicle, 200, 1, source, vehicles [ source ] ) end ) function destroyVehicle() if ( isElement ( vehicles [ source ] ) ) then destroyElement ( vehicles [ source ] ) end end addEventHandler("onPlayerLogout", root, destroyVehicle) addEventHandler("onPlayerQuit", root, destroyVehicle) addEventHandler("onPlayerWasted", root, destroyVehicle) Try this server-side.
-
Stolen https://community.multitheftauto.com/index.php?p= ... ls&id=7981 Original https://community.multitheftauto.com/ind ... ls&id=6126 DONE
-
Stolen https://community.multitheftauto.com/index.php?p= ... ls&id=7864 Original https://community.multitheftauto.com/index.php?p= ... ls&id=4856 DONE
-
timers = {} marker = createMarker(895.98,-1221.20,16.97,"cylinder") createBlipAttachedTo(marker,48) function markerx ( player ) outputChatBox ( "Stoj tu zeby zarobic jak jestes bezrobotny.", player ) timers [player] = setTimer ( function ( ) givePlayerMoney ( player, 15 ) end, 5000, 0 ) end function stopmarker ( player ) killTimer ( timers[player] ) end addEventHandler("onMarkerHit",marker,markerx) addEventHandler("onMarkerLeave",marker,stopmarker) Try this.
-
https://community.multitheftauto.com/index.php?p= ... ls&id=7881 Original https://community.multitheftauto.com/index.php?p= ... ils&id=357 DONE
-
Try this function checkveh () for _, v in ipairs(getElementsByType("vehicle")) do if getElementModel (v) == 415 then if getVehicleUpgradeOnSlot(v, 2) ~= 1003 then addVehicleUpgrade ( v, 1003 ) end end end end addEventHandler("onResourceStart",resourceRoot,checkveh)
-
https://community.multitheftauto.com/index.php?p= ... ls&id=7862 Original https://community.multitheftauto.com/ind ... ls&id=5340 DONE
-
Try to change this addEventHandler("onClientGUIClick", X, GUIClick) to this addEventHandler ( "onClientGUIClick", X, GUIClick, false )
-
Seu codigo não vai funcionar porque o source não está definido, tenta esse verdao. function kitarmas ( source ) accountname = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then giveWeapon(source, 4, 200, true) giveWeapon(source, 24, 200, true) giveWeapon(source, 26, 200, true) giveWeapon(source, 28, 200, true) giveWeapon(source, 31, 200, true) giveWeapon(source, 34, 200, true) giveWeapon(source, 37, 200, true) giveWeapon(source, 16, 200, true) giveWeapon(source, 46, 200, true) outputChatBox("#00ff00[Kitadmin]: Você pegou o Kit admin", source, 255, 255, 255, true) end end addCommandHandler("kitadmin", kitarmas)
-
Tenta trocar o arquivo RAR para ZIP.
-
Try this function KissCommand ( source ) if not ( isPedDead(source) ) then setElementFrozen (source, true) setPedAnimation (source, "KISSING", "Grlfrd_Kiss_03", -1, true, false, false ) outputChatBox ( "To stop the Kiss Click Spacebar", source, 233, 233, 233 ) bindKey ( source, "space", "down", StopCommand) end end addCommandHandler ("kiss", KissCommand) function StopCommand ( source ) setElementFrozen (source, false) setPedAnimation ( source ) unbindKey ( source, "space", "down", StopCommand) end
-
https://community.multitheftauto.com
-
You can't use test and list as command, use another command.
-
addEventHandler("onClientResourceStart", resourceRoot, function() createwindowPCS() end )
-
onMarkerHit and onMarkerLeave is a server-side event, try to use onClientMarkerHit and onClientMarkerLeave.
-
You're welcome.
-
function tilisiirto ( thePlayer, command, target, amount ) local target = getPlayerFromName ( target ) if ( target ) then if not (isGuestAccount (getPlayerAccount (thePlayer))) then if (getAccountData (getPlayerAccount (thePlayer), "nordea-cash")) then if (getAccountData (getPlayerAccount (thePlayer), "nordea-cash") >= tonumber (amount)) and (tonumber (amount) > 0) then local money = (tonumber(getAccountData (getPlayerAccount (thePlayer), "nordea-cash")) - tonumber (amount)) setAccountData (getPlayerAccount (thePlayer), "nordea-cash", tonumber(money)) givePlayerMoney (target, tonumber(amount)) outputChatBox ( tostring (amount) .. "$ nostettu tililtä, ja annettu pelaajaalle ".. getPlayerName ( target )..".", thePlayer, 0, 255, 0, false) outputChatBox ( tostring (amount) .. "$ Antoi sinulle pelaaja "..getPlayerName(thePlayer)..".", target, 0,255,0) else outputChatBox ("[Nordea]Et voi siirtää enempää mitä sinulla pankkitilillä on!", thePlayer, 255, 0, 0, false) end else outputChatBox ("[Nordea]Käyttäjä luotu!", thePlayer, 255, 0, 0, false) outputChatBox ("[Nordea]Pankki antaa sinulle 250$ tervetulolahjaksi!", thePlayer, 255, 0, 0, false) setAccountData (getPlayerAccount (thePlayer), "nordea-cash", 250) end end end end addCommandHandler("siirto", tilisiirto ) Try.
-
You're welcome.
-
local allowedTeams = { [ "USOC Member" ] = true } firstObject = createObject ( 974, 1153.8, -1766.09, 18.39 ) secoundObject = createObject ( 974, 1154.69, -1766.09, 18.39 ) local open = false function USOCDoor ( source ) local team = getPlayerTeam ( source ) if ( team and allowedTeams [ getTeamName ( team ) ] ) then if ( open ) then moveObject ( firstObject, 3000, 1153.8, -1766.09, 18.39 ) moveObject ( secoundObject, 3000, 1154.69, -1766.09, 18.39 ) open = false else moveObject ( firstObject, 3000, 1153.8, -1766.09, 0 ) moveObject ( secoundObject, 3000, 1154.69, -1766.09, 0 ) open = true end end end addCommandHandler ( "USOCdoor", USOCDoor )
