esporta05
Members-
Posts
60 -
Joined
-
Last visited
Everything posted by esporta05
-
I made script which is setting a animation on x event and x conditions. How can i stop that animation? I need to stop it after 3 seconds but i couldnt find a function for stopping it.
-
There is no guisetvisible. U need it inordeer to hide & show it properly.
-
I dont understand it. Can you please explain them with much easier examples? If you explain things step by step with lua bbcode that will be much more easier. If you can create a topic for this tutorial this will be much more better.
-
Good golf club
-
Is it so hard do detect if the logged in player account name is contained in that table? Because I don't understand anything. I am just trying to detect if the logged in player is registered in that vips table. Btw there is no guest accounts on server. They are supposed to login in order to play server. Isn't it possible like this: vips = { "Anubhav", "esporta", "bilal", } local accname = getAccountName (source) if (accname == vips) then --script body end
-
If the player account name is included in table, script will output you are vip if not script will output you aren't vip
-
Okay i need to make a if statement to find if the player is in a specified table or not. Here is the script that I made. Is this ok? local vips = } [1]=”Anubhav”, [2]=”esporta”, } if (thePlayer == vips) then outPutChatBox ("You are vip", source) else outPutChatBox("You are not a vip", source) end end
-
same issue at me too. Cant replace TXD files. There should be a bug.
-
It is really hard to detect hit at tires but you can check this out; Set a timer or event for this function and make the tire state 0 all the time. https://wiki.multitheftauto.com/wiki/Ge ... heelStates Hope this could help you
-
Hi all, Well there is a cool MYSQL tutorial for establishing connections but I can't find a tutorial for sending/retrieving datas from MYSQL database. If someone can make a tutorial for sending and receiving datas from database that will be really cool. Simple stuffs like sending a variable to there and outputting it. Just for teaching us how to send and receive data from MYSQL database
-
Hit detection supposed to work just fine. There should be a problem with your money giving script. Also u don't need to define a command for calling money function. You can call the function without adding a event handler. Simply call it with "money()". Make your players feel comfortable if (source == paymarker) then -- since you are calling the function directly you wont need to output that message money() end Btw prefer to use lua bb code rather than Code bb code.
-
Setting custom vehicle name is easy, just define a variable for them. Outputting it is easy too just check the vehicle id if it equals to the 31(infernos as far as i remember)output a message as "You enter in to the mini cooper" as a example but for me the most hardest part is deleting the original text from screen.
-
You are supposed to use source to detect which marker you hit. This if statement supposed to detect the marker that you hit: if source == paymarker So your full function should be like this function payme() if (source == pay marker) then --The script that is going to run when the player hits to the marker end end
-
direk server ip yazıp girebiliyormusun?
-
I managed it with setting alpha
-
okay thanks it worked. I dont want to open another topic so, how can i hide a DXrectangle and text? Is there anything similiar to guisetvisible function?
-
Okay I managed freezing my darling but I still need her to be immortal I forgot to tell that my script is server sided
-
So I understand that as a beginner scripter I was pushing my self so hard to make detailed and improved scripts and that was the reason why I get stuck all the time so I decided to make a simple hospital script . Getin mark get the health, simple logic. I created a medic for the marker and named it as adriana lima <3 . The problem is I dont want adriana to die or escape from me. I want her to be with me till my server stays online . So in short explanation, how can make a ped immortal and freeze it AdrianaLima = createPed ( 276, 1181.7275390625, -1332.9736328125, 14.581448554993, -90, false )
-
check out this topic: https://forum.multitheftauto.com/viewtopic.php?f=91&t=78196
-
function buyWeapon (weaponName, weaponPrice, weaponID, weaponAmmo) local money = getPlayerMoney(source) if ( tonumber(money) >= tonumber(weaponPrice) ) then giveWeapon ( source, tonumber(weaponID), tonumber(weaponAmmo), true) takePlayerMoney ( source, tonumber(weaponPrice) ) else outputChatBox ("You havent got enough money to buy this!", source) end end addEvent("buyWeapon",true) addEventHandler("buyWeapon",getRootElement(),buyWeapon)
-
Thank you so much for helping. When I am uploading resource to the community I want to highlight you in the description because If you didnt helped me I wont know what I did wrong and I will never be able to fnish this resource
-
thanks for the help again but the buttons arent working atm and no errors at debugscript. I dont think it has got anything to do about server side because the gui close button doesnt working too. It seems like I should work with more smaller resources for learning lua . Resources like ammu nations are kind a hard for me. I am trying to do this resource for 2 days and I started lua 5 days ago so I am really noob for these kind of resources
-
thanks for the help but I am getting error at 8th line as, excpecting GUIelement but got nil
-
So I scripted a ammunation resource resterday, today I decided to make a very simple pizza guy job and when I start to test the markers I see that when I enter to any kind of marker it opens the ammunation gui. So how can i fix this bug? Every markers is opening ammunation GUI... WeAN = {} M4 = {} Eagle = {} WeANclose = {} SPAZ12 = {} AK47 = {} MP5 = {} Pistol = {} WeAN.window = guiCreateWindow(471, 218, 367, 511, "WeAmmu Nation v1.0", false) guiWindowSetMovable(WeAN.window, false) guiWindowSetSizable(WeAN.window, false) M4.button = guiCreateButton(9, 50, 105, 41, "M4 \n2000$", false, WeAN.window) guiSetProperty(M4.button, "NormalTextColour", "FFAAAAAA") Eagle.button = guiCreateButton(124, 50, 105, 41, "Desert Eagle \n500$", false, WeAN.window) guiSetProperty(Eagle.button, "NormalTextColour", "FFAAAAAA") MP5.button = guiCreateButton(239, 50, 105, 41, "MP5\n1000$", false, WeAN.window) guiSetProperty(MP5.button, "NormalTextColour", "FFAAAAAA") Pistol.button = guiCreateButton(9, 101, 105, 41, "Pistol\n100$", false, WeAN.window) guiSetProperty(Pistol.button, "NormalTextColour", "FFAAAAAA") SPAZ12.button = guiCreateButton(124, 101, 105, 41, "SPAZ-12\n1500$", false, WeAN.window) guiSetProperty(SPAZ12.button, "NormalTextColour", "FFAAAAAA") AK47.button = guiCreateButton(239, 101, 105, 41, "AK-47\n1200$", false, WeAN.window) guiSetProperty(AK47.button, "NormalTextColour", "FFAAAAAA") WeANclose.button = guiCreateButton(329, 19, 28, 27, "X", false, WeAN.window) guiSetProperty(WeANclose.button, "NormalTextColour", "FFAAAAAA") local WeANmarker = createMarker ( 777, -2070, 11.5, "cylinder", 2, 0, 128, 0, 170 ) guiSetVisible(WeAN.window,false) -- -- -- function WeANmarkerEnter () guiSetVisible(WeAN.window,true) showCursor ( true ) end addEventHandler ( "onClientMarkerHit", getRootElement(), WeANmarkerEnter ) function WeANguiClose () guiSetVisible(WeAN.window,false) showCursor ( false ) end addEventHandler ( "onClientGUIClick", WeANclose.button, WeANguiClose, false ) function buym4 () triggerServerEvent("buyWeapon",getLocalPlayer(),"M4","2000","31","100") end addEventHandler ( "onClientGUIClick", M4.button, buym4, false ) function buyEagle () triggerServerEvent("buyWeapon",getLocalPlayer(),"Desert Eagle","500","24","50") end addEventHandler ( "onClientGUIClick", Eagle.button, buyEagle, false ) function buyMP5 () triggerServerEvent("buyWeapon",getLocalPlayer(),"MP5","1000","29","100") end addEventHandler ( "onClientGUIClick", MP5.button, buyMP5, false ) function buyPistol () triggerServerEvent("buyWeapon",getLocalPlayer(),"Pistol","100","22","50") end addEventHandler ( "onClientGUIClick", Pistol.button, buyPistol, false ) function buySPAZ12 () triggerServerEvent("buyWeapon",getLocalPlayer(),"SPAZ-12","1500","27","90") end addEventHandler ( "onClientGUIClick", SPAZ12.button, buySPAZ12, false ) function buyAK47 () triggerServerEvent("buyWeapon",getLocalPlayer(),"AK-47","1200","30","100") end addEventHandler ( "onClientGUIClick", AK47.button, buyAK47, false )
