Jump to content

enzopaul4

Members
  • Posts

    104
  • Joined

  • Last visited

Everything posted by enzopaul4

  1. BASS ERROR 2 in LoadMedia path:D:\MTA\mods\deathmatch\resources\account\resources\sound.wav 3d:0 loop:0 function playThatSound() local sound = playSound("resources/sound.wav") setSoundVolume(sound, 0.5) end addEventHandler("onClientResourceStart", root, playThatSound) I really don't understand why this isn't working. Any help? I got first the sound.mp3, i tough if i convert it maybe it will be better. But no change..
  2. Becouse i use phpmyadmin first time , and secound time , i use a another resource for this.
  3. ..... it takes money from the player
  4. function Slotmachine:StartPlayer(thePlayer) if(exports.global:takeMoney(thePlayer) >= self.prices.bet) then if(self.canSpin == true) then exports.global:giveMoney(thePlayer, -self.prices.bet) triggerClientEvent(thePlayer, "onSlotmachineWintext", thePlayer, "#FF0000-$"..self.prices.bet) self:Start(thePlayer) end else triggerClientEvent(thePlayer, "onSlotmachineWintext", thePlayer, "#FF0000Iti trebuie $"..self.prices.bet.." lei , ca sa dai de maneta") end end Hi guys , i make this script for my server , and this isn”t work , here is the problem i see in the debug script and consol , but i cannot find it.
  5. Hello guys , how can i make a script to set hp to a player ? Thx for help
  6. Every time when you enter on this server , the server would generate you the map and the resources , that is the client side.
  7. If you want to put a function in another function , (i am not sure) you put the dots to connect the both functions. addCommandHandler ("s", function (thePlayer) outputChatBox("".. getPlayerName(thePlayer) ..":Siema!") end ) Try this , i think that's the right form
  8. addCommandHandler ("s", function (thePlayer) outputChatBox("".. getPlayerName(player) ..":Siema!") end ) Do you mean something like this?
  9. GUIEditor = { label = {}, edit = {}, button = {}, window = {}, combobox = {}, memo = {} } function diploma() local screenW, screenH = guiGetScreenSize() if (getElementData(player,"faction")) == 4 and ( getElementData(player, "factionleader")) then GUIEditor.window[1] = guiCreateWindow((screenW - 666) / 2, (screenH - 384) / 2, 666, 384, "Diplomă Universitate", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF00FFFC") GUIEditor.button[1] = guiCreateButton(257, 347, 137, 27, "Ieși", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.label[1] = guiCreateLabel(10, 26, 137, 48, "Nume Elev:", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 0, 255, 252) GUIEditor.memo[1] = guiCreateMemo(181, 4, 20, 20, "", false, GUIEditor.label[1]) GUIEditor.label[2] = guiCreateLabel(254, 32, 149, 31, "Descriere Diplomă:", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 0, 255, 252) GUIEditor.memo[2] = guiCreateMemo(359, 24, 293, 313, "", false, GUIEditor.window[1]) GUIEditor.label[3] = guiCreateLabel(398, 343, 274, 36, "Maxim : 150 Caractere.(Pentru ajutor \n/ajutordiploma)", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[3], 0, 245, 255) GUIEditor.label[4] = guiCreateLabel(7, 71, 155, 36, "Semnătură Director:", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[4], 0, 245, 255) GUIEditor.label[5] = guiCreateLabel(10, 109, 135, 29, "Semnătură Diriginte/ă:", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[5], 0, 245, 255) GUIEditor.edit[1] = guiCreateEdit(77, 21, 130, 30, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(121, 64, 133, 32, "", false, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(135, 106, 133, 32, "", false, GUIEditor.window[1]) GUIEditor.label[6] = guiCreateLabel(11, 148, 151, 37, "TIP:", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[6], 0, 245, 255) GUIEditor.combobox[1] = guiCreateComboBox(40, 147, 140, 90, "Diplomă Mechanic", false, GUIEditor.window[1]) guiComboBoxAddItem(GUIEditor.combobox[1], "Diplomă Mechanic") guiComboBoxAddItem(GUIEditor.combobox[1], "Diplomă Medic") guiComboBoxAddItem(GUIEditor.combobox[1], "Diplomă Polițist/ă") guiComboBoxAddItem(GUIEditor.combobox[1], "Diplomă Politică") GUIEditor.button[2] = guiCreateButton(194, 150, 140, 41, "Oferă Diploma", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF00F5FF") GUIEditor.label[7] = guiCreateLabel(10, 183, 350, 164, "\n\n((OOC , Acest sistem este încă în teste , dacă găsiți o \nproblemă nu ezitați să contactați un membru staff online!\n\n\n\n Mulțumim de înțelegere!\n\nP.S.Să nu abuzați că vă tai semnat Paul_Dima și \n Cojocaru_Daniel", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[7], "default-bold-small") guiLabelSetColor(GUIEditor.label[7], 0, 245, 255) end function arataDiploma() if not guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1],true) showCursor(true,true) end end end addCommandHandler("oferadiploma",showVehicleSelection) So .. i create this gui but if i enter the game and i write the command it isn't working , i am in the right faction and leader . Can you help me guys? I cannot find what is wrong , thank you anyway!
  10. GUIEditor = { label = {}, edit = {}, button = {}, window = {}, combobox = {}, memo = {} } function diploma() local screenW, screenH = guiGetScreenSize() if (getElementData(player,"faction")) == 4 and ( getElementData(player, "factionleader")) then GUIEditor.window[1] = guiCreateWindow((screenW - 666) / 2, (screenH - 384) / 2, 666, 384, "Diplomă Universitate", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF00FFFC") GUIEditor.button[1] = guiCreateButton(257, 347, 137, 27, "Ieși", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.label[1] = guiCreateLabel(10, 26, 137, 48, "Nume Elev:", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 0, 255, 252) GUIEditor.memo[1] = guiCreateMemo(181, 4, 20, 20, "", false, GUIEditor.label[1]) GUIEditor.label[2] = guiCreateLabel(254, 32, 149, 31, "Descriere Diplomă:", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 0, 255, 252) GUIEditor.memo[2] = guiCreateMemo(359, 24, 293, 313, "", false, GUIEditor.window[1]) GUIEditor.label[3] = guiCreateLabel(398, 343, 274, 36, "Maxim : 150 Caractere.(Pentru ajutor \n/ajutordiploma)", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[3], 0, 245, 255) GUIEditor.label[4] = guiCreateLabel(7, 71, 155, 36, "Semnătură Director:", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[4], 0, 245, 255) GUIEditor.label[5] = guiCreateLabel(10, 109, 135, 29, "Semnătură Diriginte/ă:", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[5], 0, 245, 255) GUIEditor.edit[1] = guiCreateEdit(77, 21, 130, 30, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(121, 64, 133, 32, "", false, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(135, 106, 133, 32, "", false, GUIEditor.window[1]) GUIEditor.label[6] = guiCreateLabel(11, 148, 151, 37, "TIP:", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[6], 0, 245, 255) GUIEditor.combobox[1] = guiCreateComboBox(40, 147, 140, 90, "Diplomă Mechanic", false, GUIEditor.window[1]) guiComboBoxAddItem(GUIEditor.combobox[1], "Diplomă Mechanic") guiComboBoxAddItem(GUIEditor.combobox[1], "Diplomă Medic") guiComboBoxAddItem(GUIEditor.combobox[1], "Diplomă Polițist/ă") guiComboBoxAddItem(GUIEditor.combobox[1], "Diplomă Politică") GUIEditor.button[2] = guiCreateButton(194, 150, 140, 41, "Oferă Diploma", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF00F5FF") GUIEditor.label[7] = guiCreateLabel(10, 183, 350, 164, "\n\n((OOC , Acest sistem este încă în teste , dacă găsiți o \nproblemă nu ezitați să contactați un membru staff online!\n\n\n\n Mulțumim de înțelegere!\n\nP.S.Să nu abuzați că vă tai semnat Paul_Dima și \n Cojocaru_Daniel", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[7], "default-bold-small") guiLabelSetColor(GUIEditor.label[7], 0, 245, 255) end function arataDiploma() if not guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1],true) showCursor(true,true) end end end addCommandHandler("oferadiploma",showVehicleSelection) So .. i create this gui but if i enter the game and i write the command it isn't working , i am in the right faction and leader . Can you help me guys? I cannot find what is wrong , thank you anyway!
  11. local sx, sy = guiGetScreenSize ( ) function centerGUI ( guiElement ) local width, height = guiGetSize ( guiElement, false ) local x, y = ( sx / 2 - width / 2 ), ( sy / 2 - height / 2 ) guiSetPosition ( guiElement, x, y, false ) end GUIEditor = { tab = {}, staticimage = {}, tabpanel = {}, edit = {}, button = {}, window = {}, label = {} } GUIEditor.window[1] = guiCreateWindow(423, 331, 523, 367, "", false) guiWindowSetSizable(GUIEditor.window[1], false) centerGUI(GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1],false) GUIEditor.tabpanel[1] = guiCreateTabPanel(11, 109, 502, 241, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Login", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(27, 31, 63, 15, "Username", false, GUIEditor.tab[1]) GUIEditor.edit[1] = guiCreateEdit(100, 30, 352, 26, "", false, GUIEditor.tab[1]) GUIEditor.edit[2] = guiCreateEdit(97, 74, 355, 24, "", false, GUIEditor.tab[1]) GUIEditor.button[1] = guiCreateButton(314, 152, 153, 42, "Login", false, GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Register", GUIEditor.tabpanel[1]) GUIEditor.label[2] = guiCreateLabel(16, 26, 76, 15, "Username : ", false, GUIEditor.tab[2]) GUIEditor.label[3] = guiCreateLabel(16, 51, 60, 15, "Password : ", false, GUIEditor.tab[2]) GUIEditor.label[4] = guiCreateLabel(18, 80, 42, 15, "Email : ", false, GUIEditor.tab[2]) GUIEditor.button[2] = guiCreateButton(311, 168, 147, 39, "Register", false, GUIEditor.tab[2]) GUIEditor.edit[4] = guiCreateEdit(90, 24, 388, 27, "x", false, GUIEditor.tab[2]) GUIEditor.edit[5] = guiCreateEdit(90, 52, 388, 28, "y", false, GUIEditor.tab[2]) GUIEditor.edit[6] = guiCreateEdit(85, 79, 393, 26, "z", false, GUIEditor.tab[2]) addEvent("showHide",true) function showHide() if guiGetVisible(GUIEditor.window[1]) == true then guiSetVisible(GUIEditor.window[1],false) showCursor(false) elseif guiGetVisible(GUIEditor.window[1]) == false then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end addEventHandler("showHide",getLocalPlayer(),showHide) showHide() function buttonClick() if source == GUIEditor.button[2] then local username = guiGetText(GUIEditor.edit[4]) local password = guiGetText(GUIEditor.edit[5]) local email = guiGetText(GUIEditor.edit[6]) triggerServerEvent("registerRequest",getLocalPlayer(),getLocalPlayer(),username,password,email) elseif source == GUIEditor.button[1] then local username = guiGetText(GUIEditor.edit[1]) local password = guiGetText(GUIEditor.edit[2]) triggerServerEvent("loginRequest",getLocalPlayer(),getLocalPlayer(),username,password) end end addEventHandler("onClientGUIClick",GUIEditor.window[1],buttonClick) if i press register or login it is doesn't working , i have database upload on phpmyadmin , it is working really good , but it is a problem with this buttons
  12. Hi , i try to make a clos button but it still dont wiorking .. no eror .. nothing , can you giv me an exmple? Ty
  13. It isn't working i try to block it for 1 minute
  14. function createVehicleForPlayer(thePlayer, command, vehicleModel) local x,y,z = getElementPosition(thePlayer) x = x + 5 local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z) if (createdVehicle == false) then outputChatBox("SYNTAX:/createvehicle [id]",thePlayer) end end addCommandHandler("createvehicle", createVehicleForPlayer) setTimer ( createVehicleForPlayer, 1000, 1, "You cannot create a vehicle now!!Please try later again!" ) If i write in chat /createvehicle 410 it's spawn a manana but if i write again it is spawn me again one , what is wrong with setTimer ?
  15. Salutare dragi jucatori de MTA din romania, am venit pe aceasta pagina pentru a imi spune parerea legata de cei care vor sa isi deschida servere de MTA si nu au habar cum sa il porneasca..In ultima vreme am vazut ca s-au deschis o gramada , dar o gramada spun , de servere RP (toate dupa vR evident).Nu vreau sa par rau sau ceva dar am vazut ca acele servere chiar au succes..Pe cand celelante servere.. care mi-au descchis mie ochi spre MTA RP au decat jucatori care mai joaca roleplay respectand regulile (si da , au 2-3 playeri).Cum se face ca anul trecut cand am intrat pe MTA erau cateva servere dar bune , acum sunt 1000 de servere , toate dupa acelasi Gamemode .. nimic schimbat decat pozele si tradus "pe ici pe colo" ?De ce nu mai este ceea ce a fost?Ei bine as vrea sa va spun eu de ce .. deoarece JUCATORI MTA DIN ROMANIA vor decat sa se impinga cu masinutele lor si sa se omoare intre ei.Dar nici decum nu intra pe un server freeroam.Nu sunt eu expert in scripting , dar mai de mult m-a intrebat un baiat pe facebook daca il pot ajuta ca sa isi conecteze serverul catre phpmyadmin, ei bine l-am ajutat , era vR-ul . Dupa ce l-am ajutat a inceput sa imi spuna daca il pot ajuta sa schimbe checkpointurile din sf in ls , l-am ajutat iar.. si tot asa pana cand deja ma durea capul.. la sfarsit mi-a luat adminul , a schimbat toate parolele , si nu mai mi-a dat mesaj decat cand a avut o problema la server .. Acel baiat spunea ca nu are tata , ca o luat o gramada de tepe .. si ca imi da bani sa fac sv sa functioneze , am spus ca nu imi trebuie nici un ban de la nimeni i-am facut totul pe gratis , si la un moment dat mi-a cerut o resursa , la care am lucrat mult.. Am spus ca nu o dau , mi-a spus "Sa ai parte in viata de ceea ce oferi , adica nimic".Dupa cum vedeti eu spun ca e nesimtire care numai la romani se poate intampla.. Lasati si voi o parere
  16. i know it for Freeroam , but i try to make my own server (roleplay) and i don't know , but anyway thank you for help
  17. How can i make a script like if player die , to respawn he where i set it? Thx
×
×
  • Create New...