Jump to content

undefined

Members
  • Posts

    500
  • Joined

  • Last visited

Everything posted by undefined

  1. editBox = guiCreateEdit(182, 55, 102, 23, "0", false, kumarWindow) guiEditSetMaxLength(editBox, 2)
  2. undefined

    guiGetText

    Hi Guys! I have a problem. I use the edit box. I use this code: if type (moneyBox) == "number" then Im write the number on editbox but it's say "Yukariya lutfen sadece sayi giriniz..!". Where is the mistake? Code Removed
  3. Hi Guys! It's not work and debugscript is say it; WARNING: sel/test_s.lua:6: Bad Argument @ 'bindKey' Where is the my mistake? Client-Side function open() if (guiGetVisible (duyuruGrid) == true) then guiSetVisible(duyuruGrid, false) showCursor(false) elseif (guiGetVisible (duyuruGrid) == false) then guiSetVisible(duyuruGrid, true) showCursor(true) end end addEvent("openGUI", true) addEventHandler("openGUI", getRootElement(), open) Server-Side function open (player) if isObjectInACLGroup ( "user.".. getAccountName( getPlayerAccount( player ) ), aclGetGroup ( "Admin" ) ) then triggerClientEvent (player, "openGUI", player ) end end bindKey ( player, "L", "down", open )
  4. It's getAccountData. It's true! It's true. Look at the code; addEventHandler( "onPlayerWasted", root, function( totalAmmo, killer, killerWeapon, bodypart, stealth ) local playerAccount = getPlayerAccount( source ) local isAccount = ( playerAccount and not isGuestAccount( playerAccount ) ) and true or false local pSkin = getElementModel(source) setElementData( source, "Skin", pSkin ) if ( getElementData(source, "gorev" ) ) and ( not getAccountData( playerAccount, "deamuil" ) ) then missionVehicle( source ) removeElementData(source,"gorev") removeElementData(source,"trailerAttach") return end end ) local pSkin_ = ( getElementData( player, "Skin" ) or math.random(312) ) repeat until setElementModel(player,pSkin_) Help pls!
  5. Oh, I did not notice. But i have a new problem; It's not spawn the player or create marker. It's not give error and warning on debugscript.ü Where is the problem? Client-Side local allMissions = { [1]={ ["name"] = "Mission I", ["info"] = "Text" }, [2]={ ["name"] = "Mission II", ["info"] = "Text" } } addEventHandler("onClientResourceStart", resourceRoot, function() missionWindow = guiCreateWindow(238, 190, 402, 264, "Mission Panel", false) guiSetVisible(missionWindow, false) guiWindowSetSizable(missionWindow, false) guiSetAlpha(missionWindow, 0.65) nameGrid = guiCreateGridList(10, 26, 122, 228, false, missionWindow) guiGridListAddColumn(nameGrid, "Missions", 0.7) local mrow = guiGridListAddRow(nameGrid) guiGridListSetItemText(nameGrid,mrow,1,"Missions",true,false) myFont = guiCreateFont( "font.otf", 12 ) infoGrid = guiCreateGridList(142, 26, 250, 180, false, missionWindow) infoLab = guiCreateLabel(10, 40, 230, 130, "", false, infoGrid) guiSetFont(infoLab, "default-bold-small") guiLabelSetHorizontalAlign(infoLab, "center", true) yesnoGrid = guiCreateGridList(0, 10, 230, 120, false, infoLab) guiSetVisible(yesnoGrid, false) yesnoLab = guiCreateLabel(10, 10, 210, 66, "Devam etmek istiyor musun?", false, yesnoGrid) guiSetFont(yesnoLab, myFont) guiLabelSetHorizontalAlign(yesnoLab, "center", true) guiLabelSetVerticalAlign(yesnoLab, "center") yes = guiCreateButton(20, 86, 66, 24, "Evet", false, yesnoGrid) guiSetFont(yes, "default-bold-small") no = guiCreateButton(144, 86, 66, 24, "Hayır", false, yesnoGrid) guiSetFont(no, "default-bold-small") infoNameLab = guiCreateLabel(10, 9, 230, 21, "", false, infoGrid) guiSetFont(infoNameLab, myFont) guiLabelSetHorizontalAlign(infoNameLab, "center", true) for i=1,#allMissions do local row = guiGridListAddRow(nameGrid) guiGridListSetItemText(nameGrid,row,1,allMissions[i].name,false,false) end addEventHandler("onClientGUIClick",nameGrid,function() local row = guiGridListGetSelectedItem(nameGrid) if(row > 0) then local name = guiGridListGetItemText(nameGrid,row,1) guiSetText(infoLab,allMissions[row].info) guiSetText(infoNameLab,allMissions[row].name) end end, false) take = guiCreateButton(142, 223, 98, 31, "Görevi Al", false, missionWindow) guiSetFont(take, "default-bold-small") close = guiCreateButton(294, 223, 98, 31, "Kapat", false, missionWindow) guiSetFont(close, "default-bold-small") end ) function select() if (source == close) then guiSetVisible(missionWindow,false) guiSetVisible (yesnoGrid, false) showCursor(false) elseif (source == take) then guiSetVisible (yesnoGrid, true) elseif (source == no) then guiSetVisible (yesnoGrid, false) elseif (source == yes) then guiSetVisible (missionWindow, false) guiSetVisible (yesnoGrid, false) showCursor(false) local row = guiGridListGetSelectedItem(nameGrid) if (allMissions[row]) then triggerServerEvent(allMissions[row]["name"], localPlayer) setElementData( source, "gorev", source ) end end end addEventHandler("onClientGUIClick", root, select) function open() if (guiGetVisible (missionWindow) == true) then guiSetVisible(missionWindow, false) showCursor(false) elseif (guiGetVisible (missionWindow) == false) then guiSetVisible(missionWindow, true) showCursor(true) end end bindKey ("R", "down", open) Server-Side-Part function missionVehicle( source ) setTimer(function( source ) if ( not isElement( source ) ) then return end if ( isElement( blip ) ) then destroyElement( blip ) blip = nil end if ( isElement( checkpoint ) ) then destroyElement( checkpoint ) checkpoint = nil end local playerAccount = getPlayerAccount( source ) local isAccount = ( playerAccount and not isGuestAccount( playerAccount ) ) and true or false if ( isAccount ) and ( not getAccountData( playerAccount, "deamuil" ) ) then spawnPlayer( source, -1335, 500, 11.2, 180 ) local pSkin_ = ( getElementData( player, "Skin" ) or math.random(312) ) repeat until setElementModel(player,pSkin_) --triggerClientEvent(source, "gorevinfo1" , getRootElement()) setPedAnimation( source, "ped" , "WALK_gang1" ) setTimer( function () setPedAnimation(source,nil,nil) setElementFrozen ( source, true) end, 5000, 1) setCameraMatrix( source, -1340.1, 488.76, 14.9, 0, 4000, 0, 0 ) setTimer ( function () setCameraTarget( source, source ) setElementFrozen ( source, false ) end, 17500, 1 ) fadeCamera( source, true, 5 ) checkpoint = createMarker( 0, 0, 0, "checkpoint", 1, 20, 20, 20, 20, source ) attachElements( checkpoint, source, 0, 0, 0 ) end end, 100, 1, source ) end addEvent( "Mission I",true ) addEventHandler( "Mission I", getRootElement() ,missionVehicle ) And im not have the "deamuil" account...
  6. Hi Guys! Error: Where is the problem? local allMissions = { [1]={ ["name"] = "Mission I", ["info"] = "Text" }, [2]={ ["name"] = "Mission II", ["info"] = "Text" } } addEventHandler("onClientResourceStart", resourceRoot, function() missionWindow = guiCreateWindow(238, 190, 402, 264, "Mission Panel", false) guiSetVisible(missionWindow, false) guiWindowSetSizable(missionWindow, false) guiSetAlpha(missionWindow, 0.65) nameGrid = guiCreateGridList(10, 26, 122, 228, false, missionWindow) guiGridListAddColumn(nameGrid, "Missions", 0.7) local mrow = guiGridListAddRow(nameGrid) guiGridListSetItemText(nameGrid,mrow,1,"Missions",true,false) myFont = guiCreateFont( "font.otf", 12 ) infoGrid = guiCreateGridList(142, 26, 250, 180, false, missionWindow) infoLab = guiCreateLabel(10, 40, 230, 130, "", false, infoGrid) guiSetFont(infoLab, "default-bold-small") guiLabelSetHorizontalAlign(infoLab, "center", true) yesnoGrid = guiCreateGridList(0, 10, 230, 120, false, infoLab) guiSetVisible(yesnoGrid, false) yesnoLab = guiCreateLabel(10, 10, 210, 66, "Devam etmek istiyor musun?", false, yesnoGrid) guiSetFont(yesnoLab, myFont) guiLabelSetHorizontalAlign(yesnoLab, "center", true) guiLabelSetVerticalAlign(yesnoLab, "center") yes = guiCreateButton(20, 86, 66, 24, "Evet", false, yesnoGrid) guiSetFont(yes, "default-bold-small") no = guiCreateButton(144, 86, 66, 24, "Hayır", false, yesnoGrid) guiSetFont(no, "default-bold-small") infoNameLab = guiCreateLabel(10, 9, 230, 21, "", false, infoGrid) guiSetFont(infoNameLab, myFont) guiLabelSetHorizontalAlign(infoNameLab, "center", true) for i=1,#allMissions do local row = guiGridListAddRow(nameGrid) guiGridListSetItemText(nameGrid,row,1,allMissions[i].name,false,false) end addEventHandler("onClientGUIClick",nameGrid,function() local row = guiGridListGetSelectedItem(nameGrid) if(row > 0) then local name = guiGridListGetItemText(nameGrid,row,1) guiSetText(infoLab,allMissions[row].info) guiSetText(infoNameLab,allMissions[row].name) end end, false) take = guiCreateButton(142, 223, 98, 31, "Görevi Al", false, missionWindow) guiSetFont(take, "default-bold-small") close = guiCreateButton(294, 223, 98, 31, "Kapat", false, missionWindow) guiSetFont(close, "default-bold-small") end ) function select() if (source == close) then guiSetVisible(missionWindow,false) guiSetVisible (yesnoGrid, false) showCursor(false) elseif (source == take) then guiSetVisible (yesnoGrid, true) elseif (source == no) then guiSetVisible (yesnoGrid, false) elseif (source == yes) then guiSetVisible (missionWindow, false) guiSetVisible (yesnoGrid, false) showCursor(false) local row = guiGridListGetSelectedItem(nameGrid) if (allMissions[row]) then triggerClientEvent(allMissions[row]["name"], getRootElement()) end end end addEventHandler("onClientGUIClick", root, select) function open() if (guiGetVisible (missionWindow) == true) then guiSetVisible(missionWindow, false) showCursor(false) elseif (guiGetVisible (missionWindow) == false) then guiSetVisible(missionWindow, true) showCursor(true) end end bindKey ("R", "down", open)
  7. Hi Guys! I have a problem. Im make this but it's not work. It's give this error; Client-Side addEvent("hpnotclient",true) addEventHandler("hpnotclient", getRootElement(), function () guiSetEnabled ( HPLev1, true ) guiSetEnabled ( HPLev2, false ) end ) Server-Side function levelUpHP ( ) local hpLevel = ( getElementData ( source, "hp" ) or 0 ) if ( hpLevel == 0 ) then triggerClientEvent ( "hpnotclient", source) elseif ( hpLevel == 1 ) then triggerClientEvent( "hp1client", source ) elseif ( hpLevel == 2 ) then triggerClientEvent( "hp2client", source ) elseif ( hpLevel == 3 ) then triggerClientEvent( "hp3client", source ) elseif ( hpLevel == 4 ) then triggerClientEvent( "hp4client", source ) elseif ( hpLevel == 5 ) then triggerClientEvent( "hp5client", source ) elseif ( hpLevel == 6 ) then triggerClientEvent( "hp6client", source ) end end addEventHandler ( "onResourceStart", resourceRoot, levelUpHP ) addEventHandler ( "onElementDataChange", getRootElement(), function ( dataName ) if ( dataName == "hp" ) then levelUpHP ( ) end end ) Where is the problem?
  8. SolidSnake, please look at the this topic!
  9. Hi Guys. I have a problem. Im kill the zombie but it's not give exp. I check a lot but can not find anything. Where is the problem? Code Removed!
  10. Oh no. It's work perfectly. My problem is timing. Each exp arrives, I want you to start from the beginning of 2500 milliseconds. My only problem is it.
  11. givePlayerExp = math.random(50, 75) triggerClientEvent("onTestExp", killer, givePlayerExp)
  12. I'm working on exp / level system. Im make this but i have a problem. Exp have been changed, must disappearing after 2500 milliseconds. But for the first time the changing exp triggers. How to fix it? local sWidth, sHeight = guiGetScreenSize () function onTestExp() dxDrawText("+"..tostring(givePlayerExp), (1542/1680)*sWidth, (10/1050)*sHeight, (1594/1680)*sWidth, (29/1050)*sHeight, tocolor(255, 20, 0, 255), (0.60/1680)*sWidth, (0.60/1050)*sHeight, "bankgothic", "left", "top", false, false, true, true, false) end handlerExist = false addEvent("onTestExp", true) addEventHandler( "onTestExp", root, function( expe ) givePlayerExp = expe if (handlerExist == false) then addEventHandler( "onClientRender", root, onTestExp ) handlerExist = true setTimer( function () if (handlerExist == true) then removeEventHandler( "onClientRender", root, onTestExp ) handlerExist = false end end, 2500, 1 ) else removeEventHandler( "onClientRender", root, onTestExp ) addEventHandler( "onClientRender", root, onTestExp ) handlerExist = true setTimer( function () if (handlerExist == true) then removeEventHandler( "onClientRender", root, onTestExp ) handlerExist = false end end, 2500, 1 ) end end ) Sry for bad English.
  13. Thank you "iAbohanab~>". It's solved!
  14. Hi guys. I have a question. I want to create new exp/level system on zombie. Which code must I use? Thanks!
  15. Oh thank you xXMADEXx and arezu. It's solved...
  16. Post the script and meta
  17. Im use 1.3.5 but it's not work
  18. Hi guys. I have a question. What is the "tonumber, string, math.floor, pairs, until" and "_," for example local _, splash = ...?
  19. Its my new code: Code Removed I do not understand how to use it! Code Removed
×
×
  • Create New...