-
Posts
843 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Bilal135
-
Hello guys, I made this script in the free time. This is pay and spray script. The pay and spray shop is located in Los Santos, IGS. You can only get your vehicle repaired if you have 1000$ or more than 1000$. One spray blip will be created on the radar as soon as the resource starts. Screeny Downloads: https://community.multitheftauto.com/index.php?p= ... s&id=10337
-
Never mind guys, I fixed that by my own.
-
Okay, so I got one more problem. local theMarker = createMarker(1911.2722167969,-1776.7221679688, 13.382,"cylinder",2,255,0,0) addEventHandler( "onMarkerHit",theMarker, function (hitElement,mD) if getElementType ( hitElement ) == "player" and mD then if not isPedInVehicle (hitElement ) then return outputChatBox("Please sit in a vehicle!", hitElement, 255, 0, 0) end local playerVehicle = getPedOccupiedVehicle(hitElement) takePlayerMoney(hitElement, 1000) fixVehicle(playerVehicle) outputChatBox("Vehicle Fixed!", hitElement, 0, 255, 0) else outputChatBox("You are too poor!", hitElement, 255, 0, 0) end if getElementHealth(hitElement) == 100 then return outputChatBox("Vehicle's health is already 100", hitElement, 0, 255, 0) end end) When ever i went into the marker, and my vehicle health was 100, it still takes 1000$ money and the money of the player goes to "-1000$". How can I fix this? So if player will have 1000$ or more than 1000$, he will be able to fix his vehicle, if not, he wont be able. Please, tell me whats the problem?
-
Thanks Saml1er.
-
Hello, I was trying to make a pay and spray script, but I'm getting one error. function consoleCreateMarker(thePlayer) local theMarker = createMarker(1911.2722167969,-1776.7221679688, 13.3828125,"cylinder",2,0,255,255) if isElementWithinMarker(theMarker) then local playerVehicle = getPedOccupiedVehicle(thePlayer) if (playerVehicle) then fixVehicle(playerVehicle) else return false end end end setTimer(consoleCreateMarker, 1000, 1) Error: payandspray\paynspray.lua:3: Bad argument @ 'isElementWithinMarker' [Expected marker at argument 2 got none] Thanks in advance.
-
Aik aur cheez! Agar aap aik apna event banana chahtay hain. (Custom Event) us ke liye aap use kareu. addEvent("Event Name", true/false) Jese ke: addEvent("onPlayerEnterVehicle", true) addEventHandler("onPlayerEnterVehicle", root, functionName) Event name sensible hona chahiye.
-
Ebola disease? May God protect every person in this world from this Ebola, its awful.
-
If the upper code is not working, try this one. function myVehHP() if getElementHealth(source) / 100 > 25 then local vehP = getPedOccupiedVehicle(source) blowVehicle(source, vehP) outputChatBox("Vehicle Health Was Very Low!", source, 255, 0, 0) else return end end addEventHandler("onVehicleDamage", root, myVehHP) Jese ke ooper bataya mene functions ko function ke saath nahi likhna balke next line meu likhna hai. Jese ke: function myVehHP() myVehHP proper lua function nahi hai. Hameu sirf ye isi liye add karna hota hai taake ham is ko addEventHandler ya addCommandHandler ke saath likhte hain. Jese ke: addEventHandler("onVehicleDamage", root, myVehHP)
-
function getVehicleHP() if getElementHealth(source) / 100 > 25 then blowVehicle(source) outputChatBox("Vehicle Health Was Very Low!", source, 255, 0, 0) else return end end addEventHandler("onVehicleDamage", root, getVehicleHP) Mystery filled.
-
Hi guys, I was bored so I decided to create a script. This simple resource allows the online admins of the server to see what other people are talking in their teams. You must be in group "Admin" to see what other people are chatting in their teams. Screenshot Download: https://community.multitheftauto.com/index.php?p= ... s&id=10327 Thanks. I hope you all will like it.
-
Is ko gor se dekho ab. function onJoin() spawnPlayer(source, 1959.55, -1714.46, 1) giveWeapon(source, 31, 200) givePlayerMoney(source, 1000) outputChatBox("Welcome to dash server", source, 0, 255, 0) end addEventHandler("onPlayerJoin", root, onJoin)
-
Aik aur cheez jo meu batana bhool gaya hai woh hai 'math.random'. Agar aap chaheu ke koi cheez random ho is liye ye ap ko help kare ga. Jese ke agar aap chaheu ke jab aap server ko join kareu to ap ki skin 0 se 200 ids meu se aik ho. function onJoin() setPedSkin(source, math.random(0, 200), true) end addEventHandler("onPlayerJoin", root, onJoin) 'true' ya 'false' function ke status ke liye hote hain. Shukriya.
-
Ye bohat acha hai ke tum ne scripting shurou kar diya hai, ya phir at least koshis to kar rahe ho. Meu aik choti se example deta hoon. Examples hi bande ko scripting sikhati hain. Is liye ham aik choti se script banate hain. Sab se pehle notepad pe jain aur type ye kareu. (File ko meta.xml name deu) <meta> <info author="someguy" type="script" version="1.0.0" name="Some name" /> <script src="script.lua" type="server" /> </meta> Ham aik script banain gay jis se jab player ko join kare ga. Usse aik message dikhai de ga: "Welcome To The Server", is ke liye aap ko ye karna pare ga. Note: onPlayerJoin aik function nahi hai. Ye aik event hai. function onJoin() outputChatBox("Welcome To The Server", source, 255, 0, 0) end addEventHandler("onPlayerJoin", root, onJoin) end - function ko end karne ke liye use kiya gaya hai. Agar aap chahtay hain ke jab aap join kareu to message bhi aai, aur saath saath aap ke wanted level bhi 6 ho jai. function onJoin() outputChatBox("Welcome To The Server", source, 255, 0, 0) setPlayerWantedLevel(source, 6) end addEventHandler("onPlayerJoin", root, onJoin) Issi tarha aap functions ko add kar sakte hain. Lekin kabhi kabar hameu if ki zaroorat par jati hai. Jese ke, agar ham chaheu ke agar player apni skin 210 pe change kare to woh mar jai. function onChangeSkin() if getElementModel(source) == 210 then killPed(source) else return end end addEvent("onPlayerChangeSkin", true) addEventHandler("onPlayerChangeSkin", root, onChangeSkin) Aik end function ke liye aur aik end 'if' ke liye source player element hota hai agar aap player element ko define na karna chaheu. Jese ke ham kar sakte thay. function(Player) is silsiley meu hamara player element Player hai. Lekin agar ham is ko asay likheu. function() To is meu player element source hai. Command banana bohat easy hai, jese ke agar aap chahtay hain ke aik command par aap ko aik message show ho aur ap ka wanted level 6 ho jai. function setMyWantedLevel(Player) setPlayerWantedLevel(Player, 6) outputChatBox("Your Wanted Level Is Now 6!", Player, 255, 0, 0) end addCommandHandler("youcantgetme", root, setMyWantedLevel) Aik aur method bhi hai. addCommandHandler("youcantgetme", function(Player) setPlayerWantedLevel(Player, 6) outputChatBox("Your Wanted Level Is Now 6!", Player, 255, 0, 0) end ) Useful functions ke liye wiki: https://wiki.multitheftauto.com/wiki/Useful_Functions Kuch na kuch to samajh aai ho gi basic scripting ke baare meu ap ko ab.
-
Meu scripts create kar sakta hoon. Lekin FTP chahiye.
-
Simple? No awesome scripts? It will be boring then.
-
Freeroam? Scripts add ki?
-
LOL
-
Post the last code you tried. ( [ lua ] )
-
I'm also a scripter.