-
Posts
431 -
Joined
Everything posted by Al3grab
-
yes and you can make a new resource for that.
-
for the second you can use addEventHandler('onPlayerSpawn',root,function() -- or any other event removeCommandHandler('new') end ) or addEventHandler('onPlayerCommand',root,function(CommandName) if ( CommandName == 'new' ) then cancelEvent() end end )
-
since you don't want to use rockets just remove it from the creation addEventHandler("onClientProjectileCreation",root,function(creator) --- this event cannot be canceled too. local nType = getProjectileType(source) --- get the projectile type if ( nType == 19 or nType == 20 ) then --- if its a rocket launcher , or a heat seek then setTimer(setElementPosition,50,1,source,0,0,999*999) --- since it cant be canceled , move it up to the sky [ you can remove the timer i just used it to see the rocket creation ] end --- end end ) -- end and to close event )
-
i thought its pre-defined in 'executeSQLUpdate' function , Since you did not defined it.
-
i don't know much in SQL , but i think 'serial' is not defined
-
That issue is about the client server browser, it has favourites and i suggested the oppsite - black list, where users would be able to block certain servers for themselves. Not a global black list. But the global list would be better, why would someone play on an fake server which is trying to copy another ? +1
-
Thank you again, this seems to resolve that issue (Loads correctly on my first connection attempt this way) Any time , also when starting server from inside MTA 'Host Game' you can see server process and errors in F8.
-
Thank you, this works out perfectly even for my first example. Now with this resolved, I can finally move forward... There is still my first concern though, when I launch MTA and choose 'Host Game' to start a local server used to test scripts I'm currently working on, it freezes or just doesn't load up the server correctly the first time. But when I go back to the main menu after it fails the first time and repeat those same steps, it loads successfully. Can anyone explain this? Perphaps the scripts are compiled with the first attempt creating a cache although it fails to loads correctly, then the second time around it works because its cached or something? Is there a way around this though? It's rather annoying having to load the server two times when I need to test my scripts... go to C:\Program Files\MTA San Andreas 1.3\server , and launch MTA Server.exe , i think this is better than starting the server from inside MTA , you will see the error's and etc ..
-
use this , you could set it @ server side then get it from client side .. setElementData(getResourceRootElement(getThisResource()),"Test",100) --- or just resourceRoot
-
I'm sorry that it is working Thank you Any time
-
addEvent("destroy",true) addEventHandler("destroy",root, function( ) if ( isElement(hatCars[source]) and getElementType(hatCars[source]) == "vehicle" ) then destroyElement ( hatCars[source] ) local cx = math.random(15461,34641) givePlayerMoney ( source, tonumber(cx) ) outputChatBox ( "* destroy theVehicle ".. tonumber(cx) .."", source, 255, 0, 0 ) else outputChatBox ( "* Enter theVehicle ", source, 255, 0, 0 ) end end ) hatCars = {} function hatmoter(player) if not hatCars[player] then local x,y,z = getElementPosition(player) hatCars[player] = createVehicle(500, x, y, z) warpPedIntoVehicle ( source, hatCars[player]) else outputChatBox("you already have one") end end addCommandHandler ( "c", hatmoter ) addEventHandler("onPlayerQuit",root,function() hatCars[source] = nil end ) Server
-
i put 'getElementType' to make sure it's a car , and it doesn't really matter
-
i used that to check if he have a car because i didn't check it on client-side
-
EDIT: sorry didn't sow your post myonlake. Sever addEvent("destroy",true) addEventHandler("destroy",root, function( theVehicle ) if ( isElement(theVehicle) ) then destroyElement ( theVehicle ) local cx = math.random(15461,34641) givePlayerMoney ( source, tonumber(cx) ) outputChatBox ( "* destroy theVehicle ".. tonumber(cx) .."", source, 255, 0, 0 ) else outputChatBox ( "* Enter theVehicle ", source, 255, 0, 0 ) end end ) Client GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(417,300,467,219,"destroy",false) GUIEditor_Button[1] = guiCreateButton(37,119,148,54,"destroy",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(268,117,148,54,"x",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) function hide(button, state, absoluteX, absoluteY) if ( source == GUIEditor_Button[2] ) then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) guiSetInputEnabled(false) end end addEventHandler ("onClientGUIClick", getRootElement(),hide) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == GUIEditor_Button[1] ) then pCar = getPedOccupiedVehicle(getLocalPlayer()) triggerServerEvent("destroy",getLocalPlayer(),pCar) end end )
-
Server function check(player) if player then local acc = getPlayerAccount(player) local accName = getAccountName(acc) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then atype = "admin" pname = getPlayerName(player) triggerClientEvent(player, "infosend", player, accName, atype, pname) end end end addEvent("checkinfo", true) addEventHandler("checkinfo", root, function() setTimer(check,1000,0,source) end ) Client addEventHandler("onClientResourceStart",resourceRoot,function() aname = guiCreateLabel(11,745,96,18,"",false) admtype = guiCreateLabel(135,745,96,18,"",false) nick = guiCreateLabel(280,745,96,18,"",false) addEvent("infosend", true) addEventHandler("infosend", root, setGUI) triggerServerEvent("checkinfo",getLocalPlayer()) end ) function setGUI(acc, atype, pname) if ( acc and atype and pname ) then guiSetText(aname,tostring(acc)) guiSetText(adtype,tostring(atype)) guiSetText(nick,tostring(pname)) end end
-
they are imitating the servers ,, and all of the above servers are on the same ip with another port "109.123.127.173", could the MTA.TEAM ban the ip from showing on server browser !
-
WOW ! , that works .. Thank you very much did it work when punching other players too (non-script created peds) ? i didn't test that. i didn't test that , i will test it later .. and if it didn't work i can solve it , thanks again
-
WOW ! , that works .. Thank you very much
-
local tObjects = {} for nIndex, uObject in ipairs ( tObjects ) do setElementCollisionsEnabled ( uObject, false ); end Tested ,,
-
thanks for explaining that for him nice idea , i tried that but it wasn't that good , so i made this .. it works but need for improving . x,y,z = getElementPosition(source) -- get the ped pos setElementPosition(source,x,y,z+4) -- fly him up power = 100 -- number of loops .. for k=0,power do x,y,z = getElementPosition(source)-- get the ped pos rot = getPedRotation(attacker)-- get the attacker rotation if rot > 45 and rot < 140 then -- Hit From Right setElementPosition(source,x-0.1,y,z) elseif rot > 200 and rot < 300 then -- Hit From Left setElementPosition(source,x+0.1,y,z) elseif rot > 90 and rot < 270 then -- Hit From Front setElementPosition(source,x,y-0.1,z) else -- Hit From Back .. betrayer setElementPosition(source,x,y+0.1,z) end end does anyone have something better ? thanks all .