
bosslorenz
Members-
Posts
200 -
Joined
-
Last visited
Everything posted by bosslorenz
-
WTF? why are you setting the WantedLevel of the one who execute the command to 0? really? setPlayerWantedLevel(source, 0)
-
What scripts are you using bcoz my scripts works fine to me.
-
Yeah b'coz Luka doesn't know what he is commenting just like what he is doing on my posts. Try my script it should work fine.
-
Maybe I just missed a comma(,) what I said I tried all that option (when wanted, inside a car and just on the ground) and just outputs one!.
-
function newTeam() createTeam("GM TEAM") end addCommandHandler("st",newTeam) This should create a team when you execute a command (/st).
-
Do you mean once the command executed, team created and you want the one who executed the command be put in that team? Or just a command that creates a team?
-
local wantedLevel = getPlayerWantedLevel (source) if playerTeam == civteam then outputChatBox("You are already on Civilian team",source,255,0,0) return end if wantedLevel == 0 then veh = isPedInVehicle(source) if (veh) then outputChatBox("You are on vehicle",source,255,0,0) return end outputChatBox("You are now a Civilian",source,0,255,0) setPlayerTeam(source,civilian) elseif wantedLevel > 0 then outputChatBox("You are wanted",source,255,0,0) end end addCommandHandler("civilian",Civilian) Please dont event reply if you are not going to change something.
-
Problem with what you gave is that upon going to the 2nd marker, the 2nd marker wont disappear now and also the other marker shows.
-
civilian = createTeam("Civilian Workers",255,255,0) function Civilian (source) local civteam = getTeamFromName("Civilian Workers") local playerTeam = getPlayerTeam ( source ) local wantedLevel = getPlayerWantedLevel (source) if playerTeam == civteam then outputChatBox("You are already on Civilian team",source,255,0,0) return end if wantedLevel == 0 then veh = isPedInVehicle(source) if (veh) then outputChatBox("You are on vehicle",source,255,0,0) return end outputChatBox("You are now a Civilian",source,0,255,0) setPlayerTeam(source,civilian) elseif wantedLevel > 0 then outputChatBox("You are wanted",source,255,0,0) end end addCommandHandler("civilian",Civilian) What did I miss here? I have command /civilian. The problem is that all the option I tried using /civilian when wanted, inside a car or just on the ground. It gives only one output the You are wanted
-
-SERVER- local rootElement = getRootElement() local plane = {[431] = true, [437] = true} local planeTable = { [1]={1812.65198, -1889.86047, 13.41406}, [2]={1825.22791, -1635.03711, 13.38281}, [3]={1855.01685, -1430.47449, 13.39063}, [4]={1732.81580, -1296.87122, 13.44294}, [5]={1473.19226, -1295.77124, 13.48315}, [6]={1443.60376, -1498.26660, 13.37650}, [7]={1426.37280, -1716.12439, 13.38281}, [8]={1315.06909, -1656.43799, 13.38281}, [9]={1359.06250, -1432.39734, 13.38281}, [10]={1169.82983, -1392.34473, 13.41728}, [11]={930.76508, -1392.92627, 13.26561}, [12]={815.24756, -1317.91345, 13.44460}, [13]={585.04199, -1320.53748, 13.40609}, [14]={526.99365, -1624.20361, 16.63225}, } function getNewPilotLocation(thePlayer, ID) local x, y, z = planeTable[ID][1], planeTable[ID][2], planeTable[ID][3] triggerClientEvent(thePlayer,"pilot_set_location",thePlayer,x,y,z) end function onVehicleEnter(thePlayer) if not plane[getElementModel(source)] then return end if not getPlayerTeam(thePlayer) then return end if getTeamName(getPlayerTeam(thePlayer)) == "Pilot" then local x, y, z = getNewPilotLocation(thePlayer, 1) setElementData(thePlayer,"pilotData",1) end end addEventHandler("onVehicleEnter",rootElement,onVehicleEnter) addEvent("pilot_finish",true) addEventHandler("pilot_finish",rootElement, function (client) if not isPedInVehicle(client) then return end if not busses[getElementModel(getPedOccupiedVehicle(client))] then return end givePlayerMoney(client, math.random(30,60)) if #busTable == tonumber(getElementData(client,"pilotData")) then setElementData(client,"pilotData",1) else setElementData(client,"pilotData",tonumber(getElementData(client,"pilotData"))+1) end getNewPilotLocation(client, tonumber(getElementData(client,"pilotData"))) end) -CLIENT- local client = getLocalPlayer( ) local rootElement = getRootElement() local marker = nil local blip = nil addEvent("pilot_set_location",true) addEventHandler("pilot_set_location",rootElement, function (x, y, z) marker = createMarker(tostring(x), tostring(y), tostring(z)-1, "cylinder", 3.5, 255, 255, 0, 170) blip = createBlipAttachedTo( marker, 0, 2, 255, 255, 0, 255 ) addEventHandler("onClientMarkerHit",marker,onPilotStopHit) end) function onPilotStopHit(hitPlayer) if not hitPlayer == client then return end triggerServerEvent("pilot_finish",client,client) if isElement(blip) then destroyElement(blip) end if isElement(marker) then removeEventHandler("onClientMarkerHit",marker,onPilotStopHit) destroyElement(marker) end end addEventHandler("onClientVehicleExit",rootElement, function () if isElement(marker) then removeEventHandler("onClientMarkerHit",marker,onPilotStopHit) destroyElement(marker) end if isElement(blip) then destroyElement(blip) end end) Leaving the bus resets the marker. How can I make: 1) The marker stays if I get back to the bus. 2) Make a timer 10secs when leave the bus, after 10secs it will reset to the first marker.
-
Thanks @Walid. Also I forgot the the player on elseif code. FIXED.
-
function LSJobWarp(player) if (player and isElement(player) and getElementType(player) == "player") then if (source == LSJob_in) then local watedLevel = getPlayerWantedLevel (player) if watedLevel > 5 then outputChatBox("You have been caught escaping, you are jailed!", 255, 0, 0) return end setElementPosition(player, 1727, -1640.53, 20.2) setElementInterior(player, 18) setTimer(setElementFrozen, 3000, 1, player, false) elseif (source == LSJob_out) then setElementPosition(player, 1727, -1635, 20.2) setElementInterior(player,0) setTimer(setElementFrozen, 3000, 1, player, false) outputChatBox("Come back again!", 0, 255, 0) end end end addEventHandler("onMarkerHit", root, LSJobWarp) Why is that I added outputChatBox after wantedLevel > 5 it doesnt work
-
How can I make player who hit LSJob_in with (wanted > 5) will not warp in setElementPosition(player, 1727, -1640.53, 20.2) instead they will spawn on my desired location. LSJob_in = createMarker(1727, -1637, 20.5, "arrow", 1, 0, 255, 0, 255) LSJob_out = createMarker (1727, -1637.7, 20.5, "arrow", 1, 0, 255, 0, 255) function LSJobWarp(player) if (source == LSJob_in and getElementType(player) == "player") then setElementPosition(player, 1727, -1640.53, 20.2) setElementFrozen(player, false) setTimer(setElementFrozen, 1000, 1, player, false) elseif (source == LSJob_out and getElementType(player) == "player") then setElementPosition(player, 1727, -1635, 20.2) setTimer(setElementFrozen, 2500, 1, player, true) outputChatBox("Come back again!", 0, 255, 0) end end addEventHandler("onMarkerHit", root, LSJobWarp)
-
What codes do I need to make a GUI appear when someone is just newly registered. But this GUI wont appear if its old account. Only for new accounts.
-
Try this one. I just searched some codes made by TAPL. addEventHandler("onClientVehicleDamage", root, function(attacker) if attacker and getElementType(attacker) == "player" then local driver = getVehicleController(source) if driver then local attackerTeam = getPlayerTeam(attacker) local driverTeam = getPlayerTeam(driver) if attackerTeam and driverTeam and attackerTeam == driverTeam then cancelEvent() end end end end)
-
Somebody knows how to respawn a default objects? Like when I destroyed a traffic light, i can do setTimer for it to spawn again.
-
Maybe they changed the texture of the weapons, thats why it looks like a new weapon to you.
-
Ive had this problem too, the way u change the ZombieSpeed is by setting it to , meta.xml right?? Just better change this line ZombieSpeed = get("zombies.Speed") to ZombieSpeed = 2
-
1..For group scoreboard, you can get a gang system from resource mtasa 2..PVP kills.get from deathmatch gamemode. 3.. Zombie Kills, u gotta need zombies by slothman then go in this section for that scoreboard https://forum.multitheftauto.com/viewtopic.php?f=91&t=87536
-
function wantedLevelChange(attacker, weapon, bodypart) if isElement(attacker) and getElementType(attacker) == "player" then local playerTeam = getPlayerTeam ( attacker ) if playerTeam then local teamName = getTeamName(playerTeam) if ( teamName ~= "Police" ) then if ( bodypart == 9 ) then setPlayerWantedLevel(attacker,5) else setPlayerWantedLevel(attacker,3) return end else if ( bodypart == 9 ) then setPlayerWantedLevel(attacker,0) else setPlayerWantedLevel(attacker,3) return end end end end end addEventHandler("onPlayerDamage", getRootElement(), wantedLevelChange)