Anubhav
Members-
Posts
2,277 -
Joined
-
Last visited
Everything posted by Anubhav
-
Did you tried my? If it didn't work give me the debugscript 3 errors.
-
No Citizen , He wants that he uses /ped skinID and he will get the skin. Any skin ID. Not only theese two.
-
function onResourceStart() if getElementData ( hitElement, "Occupation" ) == "New World Order" then txd = engineLoadTXD ( "infernus.txd" ) engineImportTXD ( txd, 411 ) dff = engineLoadDFF ( "infernus.dff", 411 ) engineReplaceModel ( dff, 411 ) end end addCommandHandler( "infernus", onResourceStart)
-
Easy. Go to your mta directory where all things and installed and go to: server\mods\deathmatch\resources\[gamemodes] and add a folder and paste the zip or files in the folder..
-
https://forum.multitheftauto.com/viewforum.php?f=105 is correct sections to post.
-
https://forum.multitheftauto.com/viewtopic.php?f=91&t=71577
-
Thanks for correcting it. I din't saw there was another team also.
-
I suggest you to make it relative . You can also use guiGetScreenSize
-
theSkin = {105, 106, 107, 102, 103, 104, 28, 29} team = createTeam( "Criminal" , 255 , 0 , 0 ) function getWantedLevelAndSetCriminal (ammo, attacker, weapon, bodypart) local team = getPlayerTeam ( attacker ) local wlevel = getPlayerWantedLevel ( attacker ) if attacker and attacker ~= source then if getElementType ( attacker ) == "player" then if wlevel > 3 and not getTeamName( team ) == "Criminal" then setPlayerTeam(attacker, team) outputChatBox ("You are a Dmer !", attacker, 255, 0, 0) setTimer (triggerClientEvent, 1000, 1, attacker, "messCrim", attacker ) setElementModel (attacker, theSkin[math.random(1, #theSkin)] ) setPlayerNametagColor ( attacker, 255, 0, 0 ) setTimer (triggerClientEvent, 1000, 1, attacker, "createHouseEvent", attacker ) end end end end addEventHandler ("onPlayerWasted", root, getWantedLevelAndSetCriminal)
-
First of all you will need to use triggerServerEvent. Use it and add the event onPlayerJoin.
-
We won't script for you. 1 - Search on community. 2 - There is a me command but not do command.
-
function takeJob () if source == taker then destroyElement(pilot) noMarker = createMarker(1953.6999511719, -2178.3000488281, 13.5, "cylinder", 3, 170, 240, 10, 0) triggerServerEvent("onTakka", thePlayer, "yo") requestNewMarkers() guiSetVisible(jobWindow, false) showCursor(false) end end addEventHandler("onClientGUIClick", getRootElement(), takeJob) function cancelJob () if source == canceler then guiSetVisible(jobWindow, false) showCursor(false) end end addEventHandler("onClientGUIClick", getRootElement(), cancelJob) function requestNewMarkers () local poopMarkers = { {1816.8000488281, -2517.1000976563, 12.60000038147}, {-1348.6999511719, -235, 13.199999809265}, {416.20001220703, 2503.8000488281, 15.5}, {1572.0999755859, 1472.1999511719, 10.800000190735}, } local x,y,z = unpack(poopMarkers[math.random(#poopMarkers)]) createMarker(x,y,z) guiSetVisible(jobWindow, false) createBlipAttachedTo(reach, 51) end function otherMarker () local poopMarkers1 = { {1816.8000488281, -2517.1000976563, 12.60000038147}, {-1348.6999511719, -235, 13.199999809265}, {416.20001220703, 2503.8000488281, 15.5}, {1572.0999755859, 1472.1999511719, 10.800000190735}, } local x,y,z = unpack(poopMarkers1[math.random(#poopMarkers1)]) guiSetVisible(jobWindow, false) createBlipAttachedTo(screach, 51) end function LS (hitElement) if source == reach then if hitElement == thePlayer then triggerServerEvent("onChakka", thePlayer, "yokohama") otherMarker() end end end addEventHandler("onClientMarkerHit", getRootElement(), LS)
-
function updateEngineSound() -- We get a table of all vehicles on the server: local allVehicles = getElementsByType("vehicle") -- we then do a loop that will iterate over that table: for index, veh in ipairs (allVehicles) do --It's like saying: "For each vehicle, do this" -- we get the model of the vehicle local model = getElementModel(veh) -- if the model is equal to 411 then do this if model == 411 then -- if the engine is on if getVehicleEngineState(veh) then -- we get the position of that vehicle local x, y, z = getElementPosition(veh) -- we then try to get the sound we maybe created and stored as an element data -- for that vehicle. If we didn't yet, then it will return false. local sound = getElementData(veh, "engineSound") -- if the inverse of sound is true (same as: if sound is equal to false) -- Note that "not false" will give true if not sound then -- we create the sound at the veh position and loop it sound = playSound3D("sounds/song.mp3", x, y, z, true) -- we store that sound in an element data I decided to call "engineSound" setElementData(veh, "engineSound", sound) end -- if the sound is paused (because the engine was off) then if isSoundPaused(sound) then -- we "unpause" the sound setSoundPaused(sound, false) end -- we then need to get the speed local velocityX, velocityY, velocityZ = getElementVelocity(veh) -- calculate the global speed in mph from the 3 velocities: -- use pythagorean theorem to get actual velocity -- raising something to the exponent of 0.5 is the same thing as taking a square root. local actualspeed = (velocityX^2 + velocityY^2 + velocityZ^2)^(0.5) -- multiply by 50 to obtain the speed in meters per second and -- then by 111.847 to obtain the speed in meters per hour local mph = actualspeed * 50 * 111.847 -- we try to calculate the sound speed according to the mph -- I guess 80mph is the speed that the original sound sounds like and -- I also guess 0.25 is the min speed that the sound can be at to still sounds like an engine. -- I added 80/minSoundSpeed to 80 to compensate the minSoundSpeed we added local minSoundSpeed = 0.25 local soundSpeed = mph/(80+80/minSoundSpeed) + minSoundSpeed -- and then we apply it to the sound setSoundSpeed (sound, soundSpeed) -- and finally update the sound position to follow the vehicle setElementPosition(sound, x, y, z) else -- otherwise (so if the engine is off) -- we pause the sound setSoundPaused(sound, true) end -- close the "if engine was on" end -- close the "if model was 411" end -- end of the loop end setTimer(updateEngineSound, 50, 0) --repeat that function every 50 ms
-
i got a idea which you can use to make it. Use: createObject(arguments) -- make it with a ladder setElementPosition createMarker onMarkerHit My idea: You can create a ladder where you want by createObject. Then create a marker for going up and use onMarkerHit event and setElementPosition. createMarker for creating the marker.
-
Creating a return function through Server and Client
Anubhav replied to -ffs-AbodyRulez's topic in Scripting
EXAMPLE: Server: function greetingHandler ( message ) -- the predefined variable 'client' points to the player who triggered the event and should be used due to security issues outputChatBox ( "The client says: " .. message, client ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", root, greetingHandler ) Client; function greetingCommand ( commandName ) triggerServerEvent ( "onGreeting", localPlayer, "Hello World!" ) -- localPlayer instead of root makes the client player the 'source' on the server function, eliminating the need for an additional player argument to be transferred. end addCommandHandler ( "greet", greetingCommand ) NOTE: Example is from WIKI. -
Price . Are you sure that used setElementData ( source, "Stafftab", false) so you are getting that data?
-
createRadarArea showHUDCompenent
-
Thanks alot NOki.
-
MTA counter strike 1.6 Server Information-: We are a small community created by Deepy and me. We are totaly based on Counter strike 1.6. It will look like it because of mods and textures and more. We will try to release as fast as possible. Features List-: Mods : Skins and all. [100%] First Player : First player camera with aim and fitted weapon. [0%] HUD : CS Hud and designed alot. [100%] Maps : [0%] Admin Auto Tags: [0%] We are adding more soon. Staff List-: Leader | The main player of server. - Anubhav(me) - Deepy Head Staff | Controller of complaints and bans,mutes,reconnect and releated things to it. - Empty Head Moderator | He takes the care of muting in server. Also take cares of banes and staffs. - Empty Moderator | He got this rank for showing that he can be staff. He can only kick/mute players. - Empty Trial Staff | He is new staff. He can only mute . He needs to prove that he can be staff. -Empty Owner iNfo Skype: Anubhav (anubhav.agarwal87) , Deepy (Deepu.Ramachandran2) Server We haven't released forum or server. We will be releasing it after its over.
-
Use that script as server.
-
Yesterday when i was thier , thier were 4 players. I came with my friend Don(deepy). I am gonna crowd this server totaly.
-
use bindKey or addCommandHandler guiSetVisible playSound play3DSound
-
function spawnMe(x, y, z) if not x then x, y, z = getElementPosition(source) end if isPedTerminated(source) then repeat until spawnPlayer(source, x, y, z, 0, 0) else spawnPlayer(source, x, y, z, 0, getPedSkin(source)) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end