-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
Nothings wrong other than the event "onPlayerJoin" is server side, and here GUI Editor.button[2] does not exist. guiSetFont(GUIEditor.button[2], "sa-header") And still the window should be showing when you start the resource/join the server. Maybe you have something wrong in the meta.
-
ههههههههه مسوي هريسه تراه ذا مثال الويكي و أنت حاط فيه هريس و بيض و جبن و ملح و سكر و كبسه و عصير و هندي ميت هههههههههههه https://wiki.multitheftauto.com/wiki/CreateColCuboid
-
He's wants to get all registered accounts in the server. for i, account in ipairs(getAccounts()) do setAccountData(account , "ADmoney", 0) end
-
Use element data with event onElementDataChange.
-
المشكلة على الأغلب في حجم الماركر 1.5 جرب تحط الحجم
-
http://i.imgur.com/Ag0hDKj.png
-
حط الكود بعد ما سويته
-
^^ ردودكم أيش دخلها بالموضوع يعني لازم تحرفون مسار الموضوع 360 درجة؟ بما ان صاحب الموضوع تم افادته Topic Locked.
-
https://wiki.multitheftauto.com/wiki/Scripting_Introduction
-
جرب addEventHandler("onClientGUIClick", root, function() if (source == J13) then triggerServerEvent("skin1", localPlayer) xxx(source) elseif (source == J14) then triggerServerEvent("skin2", localPlayer) xxx(source) elseif (source == J15) then triggerServerEvent("skin3", localPlayer) xxx(source) elseif (source == J16) then triggerServerEvent("skin5", localPlayer) xxx(source) end end) function xxx(xx) guiSetEnabled(J13, true) guiSetEnabled(J14, true) guiSetEnabled(J15, true) guiSetEnabled(J16, true) guiSetEnabled(xx, false) end
-
change this if getElementData ( localPlayerName, "VIP.person" ) then to if getElementData ( localPlayer, "VIP.person" ) then
-
What is the point of getting the data and setting it again without any change?
-
هذا ما يصير https://wiki.multitheftauto.com/wiki/AddVehicleSirens
-
Event: onClientPlayerWasted playSound guiCreateStaticImage guiSetVisible triggerServerEvent addEvent addEventHandler givePlayerMoney
-
There an resource called "ipb" that can show you every scripts CPU/RAM usage so you can know if it script issue or not and which script caused high CPU usage. This resource comes with mta resources, if you don't have it you can get it from here: http://code.google.com/p/mtasa-resources/downloads/list
-
--[[ Author: xXMADEXx File: jobs/server.lua type: Server Copyright 2012 (c) xXMADEXx --]] local mechanic_job_marker_ls = createMarker (2200.19507, -1970.24207, 13.7841, "cylinder", 1.5, 0, 100, 255, 0 ) local mechanic_job_marker_sf = createMarker (-2037.205078125, 174.556640625, 27.8359375, "cylinder", 1.5, 0, 100, 255, 0 ) local mechanic_job_marker_LV = createMarker (1658.5751953125, 2199.5830078125, 9.8203125, "cylinder", 1.5, 0, 100, 255, 0 ) -- GUI -- job = "Mechanic" local resX,resY = guiGetScreenSize() local width,height = 606,372 local X = (resX/2) - (width/2) local Y = (resY/2) - (height/2) mechanic_job_window = guiCreateWindow(X,Y,width,height,"RoG Jobs - ".. job,false) guiWindowSetMovable(mechanic_job_window,false) guiWindowSetSizable(mechanic_job_window,false) guiSetVisible(mechanic_job_window,false) mechanic_job_description = guiCreateMemo(38,46,524,260,"\nAs a mehcanic, you can go around San Andreas, lookign for people who have damaged cars.\nWhen you find someone who needs their car fixed, just simply get into the vehicle and type '/fix' to repair their vehicle. You have to make sure they pay you, using the commands /pay [who] [amount] or /give [who] [amount]",false,mechanic_job_window) guiMemoSetReadOnly(mechanic_job_description,true) mechanic_job_take = guiCreateButton(44,313,261,44,"Accept Job",false,mechanic_job_window) mechanic_job_exit = guiCreateButton(306,313,261,44,"Cancel",false,mechanic_job_window) --close function -- function closeWindow() if (source == mechanic_job_exit) or (source == mechanic_job_take) then guiSetVisible(mechanic_job_window, false) showCursor(false,false) end end addEventHandler("onClientGUIClick", mechanic_job_exit, closeWindow) addEventHandler("onClientGUIClick", mechanic_job_take, closeWindow) -- When you get near ped -- function markerhit(hitElement) if hitElement == localPlayer then guiSetVisible(mechanic_job_window, true) showCursor(true) end end addEventHandler("onClientMarkerHit", mechanic_job_marker_ls, markerhit) addEventHandler("onClientMarkerHit", mechanic_job_marker_sf, markerhit) addEventHandler("onClientMarkerHit", mechanic_job_marker_LV, markerhit) function mechanicTakeJob() triggerServerEvent("mechanicTakesJob",localPlayer) triggerServerEvent("rog:teams:setteam:community",localPlayer) end addEventHandler("onClientGUIClick", mechanic_job_take , mechanicTakeJob, false)
-
function sigarette() if ( source == GUIEditor_Button[3] ) then local PlayerMoney = getPlayerMoney() if ( PlayerMoney >= 1000) then takePlayerMoney(1000) local x, y, z = getElementPosition ( localPlayer ) local Sigarette = createObject ( 1485, x, y, z ) attachElements ( Sigarette, localPlayer, 0.05, 0, 0.7, 0, 45, 118 ) end end end addEventHandler( "onClientGUIClick", root, sigarette )
-
Police تأكد أنك حاطه سيرفر + تأكد أنك في تيم addEventHandler("onResourceStart", resourceRoot, function() gatePolice1 = createObject(980, 1544.9, -1627.9, 15.1, 0, 0, 90) checkGateMarker = createMarker(1544.9, -1627.9, 15.1, "corona", 6.0, 0, 0, 255, 0) for i, player in ipairs (getElementsByType("player")) do bindTheKeys(player) end end) addEventHandler("onPlayerJoin", root, function() bindTheKeys(source) end) function bindTheKeys(player) bindKey(player, "Tab", "down", gateCheckingTeam) end function gateCheckingTeam(player) local Team = getPlayerTeam(player) local TeamName = Team and getTeamName(Team) or "" if isElementWithinMarker(player, checkGateMarker) and (TeamName == "Police") then moveObject(gatePolice1, 2000, 1544.9, -1627.9, 9.2) end end addEventHandler("onMarkerLeave", checkGateMarker, function(player) if getElementType(player) ~= "player" then return end local Team = getPlayerTeam(player) local TeamName = Team and getTeamName(Team) or "" if (TeamName == "Police") then moveObject(gatePolice1, 2000, 1544.9, -1627.9, 15.1) end end)
-
addEventHandler("onResourceStart", resourceRoot, function() gatePolice1 = createObject(980, 1544.9, -1627.9, 15.1, 0, 0, 90) checkGateMarker = createMarker(1544.9, -1627.9, 15.1, "corona", 6.0, 0, 0, 255, 0) for i, player in ipairs (getElementsByType("player")) do bindTheKeys(player) end end) addEventHandler("onPlayerJoin", root, function() bindTheKeys(source) end) function bindTheKeys(player) bindKey(player, "Tab", "down", gateCheckingTeam) end function gateCheckingTeam(player) local Team = getPlayerTeam(player) local TeamName = Team and getTeamName(Team) or "" if isElementWithinMarker(player, checkGateMarker) and (TeamName == "أسم التيم هنا") then moveObject(gatePolice1, 2000, 1544.9, -1627.9, 9.2) end end
-
onPlayerJoin + canclEvent? Nice joke.
