Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Need Help

    this is optional, let it blank
  2. Castillo

    Need Help

    Please, don't re-post, be patient and wait for an answer, second, maybe you need to open the ports for it? dunno some does. TCP: 22003 UDP: 22005 UDP: 22126
  3. Castillo

    Need Help

    this is the solution to your question: https://wiki.multitheftauto.com/wiki/Server_Manual
  4. really, i don't see what can be wrong, i change the arguments positions and works but then others stops working Edit: well, nevermind then i've made separate functions (was my first idea) so now works well, thanks anyway.
  5. function hey ( playerSource, command ) outputChatBox ( "#808080< #00FFFF"..getPlayerName( playerSource ).."> #808080Says Heeeeeeeeyyy!!!!", getRootElement(), 255, 255, 255, true ) end addCommandHandler ( "hey", hey )
  6. what do you mean with "debug"?? its output when i execute the function "nil" ..
  7. hey, i've found a really weird problem at my script, i'm triggering from client side some datas and when i want to get them at server keeps saying "nil", if i change the argument positions at function it will work some times but its really annoying to catch them all working, here is my code. function editDatas(cliente,evento,color,bank,cash) local jug = getElementData(cliente,"clickedPlayer") local charjug = getElementData(cliente,"clickedCharacter") if evento == "color" then exports.CasHaw:setCharacterData(jug,charjug,"redcolor",color[1]) exports.CasHaw:setCharacterData(jug,charjug,"greencolor",color[2]) exports.CasHaw:setCharacterData(jug,charjug,"blueolor",color[3]) outputChatBox("Colors changed to: ".. color[1] ..":".. color[2] ..":".. color[3] .."!",cliente,0,255,0) elseif evento == "bank" then exports.CasHaw:setCharacterData(jug,charjug,"bank",tostring(bank)) outputChatBox("Bank balance set to: ".. tostring(bank) .."!",cliente,0,255,0) elseif evento == "cash" then exports.CasHaw:setCharacterData(jug,charjug,"cash",tostring(cash)) outputChatBox("Hand money set to: ".. tostring(cash) .."!",cliente,0,255,0) end end addEvent( "changeCharData", true ) addEventHandler( "changeCharData", getRootElement(),editDatas)
  8. One more sleepless guy here. LOL you are a retard or what? (btw i just wake up too haha) if you want help you don't have to insult us, i guess that way you will get banned
  9. What was wrong then? Tell us and then we can close the topic. i will tell us what was wrong since i had to fix it , he wasn't calling getstatus function that way it won't ever work, so i added a triggerServerEvent and now is working.
  10. No, you must sleep or stop being an idiot, what varez gave you is a link to download mta-paradise (a roleplay gm)
  11. as we ever say, admin powers i never enough since most of scripters already have a own server i recommend you to start learning how to script https://wiki.multitheftauto.com/wiki/Main_Page
  12. I don't think you are the creator of this, if i'm right his name is "Spawn", also my second point is that you can't really script too much so making this would be hard for you
  13. I don't see the point of your post, i already posted this and added showCursor function also.
  14. Its all fine dude, i ever check this
  15. wow lol, this is really funny script
  16. it does same problem, btw my deaths data its 1 and kills 960. this is the current code, function ratio(cliente) local account = getPlayerAccount (cliente) local zombiekills = getAccountData(account,"zombieKills") local deaths = getAccountData(account,"deaths") if deaths == 0 or deaths == "0" or deaths == nil then ratio = "" triggerClientEvent (cliente,"updateClientRatio",cliente,ratio) else local ratio = round(zombiekills / deaths, rat) triggerClientEvent (cliente,"updateClientRatio",cliente,ratio) end end addEvent("getInfoFromClient", true) addEventHandler("getInfoFromClient", getRootElement(), ratio)
  17. i have added what you said and keeps saying attempt to perfrom arithmetic on a nil value also when i open the menu it says this: got values: nil and nil, sending values: 966 and 0, got values: 966 and 0 Edit: i was thinking that i can also make it server side then trigger it and use guiSetText but the problem now is that this keeps saying my ratio are my kills... local rat = 2 function round(num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end function ratio(cliente) local account = getPlayerAccount (cliente) local zombiekills = getAccountData(account,"zombieKills") local deaths = getAccountData(account,"deaths") if deaths == 0 or deaths == "0" then ratio = "" triggerClientEvent (cliente,"updateClientRatio",cliente,ratio) else local ratio = round(zombiekills / deaths, rat) triggerClientEvent (cliente,"updateClientRatio",cliente,ratio) end end addEvent("getInfoFromClient", true) addEventHandler("getInfoFromClient", getRootElement(), ratio)
  18. Oh my shop script, well you are doing a complete mess out there shopWindow = guiCreateWindow(367,105,334,435,"Shop",false) guiSetVisible (shopWindow, false) guiSetAlpha(shopWindow,1) guiWindowSetSizable(shopWindow,false) tabPanel = guiCreateTabPanel(11,23,314,372,false,shopWindow) guiGridListSetSelectionMode(carGrid,0) costColumn = guiGridListAddColumn(carGrid,"$",0.3) tab2 = guiCreateTab("ÃWeapon",tabPanel) weapGrid = guiCreateGridList(4,6,305,291,false,tab2) guiGridListSetSelectionMode(weapGrid,0) weapColumn = guiGridListAddColumn(weapGrid,"Weapon",0.5) costColumn = guiGridListAddColumn(weapGrid,"$",0.3) weapButton = guiCreateButton(107,308,100,29,"Buy",false,tab2)local weapons = {{5,50},{6,100},{7,200},{8,250},{9,500},{22,500},{23,500},{24,500},{29,500},{31,800},{33,900},{34,950},{30,1000},{25,1100},{26,1200},{27,1500},{28,1500},{32,2000},} for i,v in ipairs (weapons) do local itemName = getWeaponNameFromID (v[1]) local row = guiGridListAddRow (weapGrid) guiGridListSetItemText (weapGrid, row, 1, itemName, false, true) guiGridListSetItemText (weapGrid, row, 2, tostring(v[2]), false, true) end guiSetAlpha(weapGrid,1) closeButton = guiCreateButton(112,401,113,24,"Close",false,shopWindow) local vehicles = {{579,60000},{400,60000},{404,28000},{489,65000},{505,65000},{479,45000},{442,45000},{458,45000},{602,100000},{496,42500},{401,41000},{518,60000},{527,75000},{589,75000},{419,45000},{533,75000},{526,50000},{474,55000},{545,50000},{517,45000},{410,41000},{600,50000},{436,41000},{580,50000},{439,75000},{549,75000},{491,45000},{445,45000},{507,45000},{585,45000},{587,100000},{466,55000},{492,50000},{546,45000},{551,45000},{516,45000},{467,45000},{426,47500},{547,45000},{405,55000},{409,75000},{550,45000},{566,45000},{540,45000},{421,50000},{529,45000},{402,250000},{542,65000},{603,150000},{475,75000},{562,175000},{565,95000},{559,125000},{561,50000},{560,125000},{558,100000},{429,150000},{541,150000},{415,150000},{480,95000},{434,100000},{494,200000},{502,200000},{503,200000},{411,300000},{506,150000},{451,300000},{555,95000},{477,95000},{499,25000},{498,25000},{578,50000},{486,70000},{406,500000},{573,250000},{455,75000},{588,50000},{403,75000},{423,1000000},{414,50000},{443,75000},{515,75000},{514,75000},{531,12000},{456,45000},{422,45000},{482,95000},{530,12000},{418,45000},{572,12000},{582,50000},{413,50000},{440,50000},{543,65000},{583,12000},{478,35000},{554,50000},{536,75000},{575,75000},{534,75000},{567,75000},{535,75000},{576,75000},{412,75000},{568,75000},{457,12000},{483,45000},{508,40000},{571,10000},{500,55000},{444,250000},{556,250000},{557,250000},{495,100000},{539,75000},{485,12000},{431,60000},{438,45000},{437,60000},{574,12000},{420,45000},{525,75000},{408,50000},{428,65000}} for i,v in ipairs (vehicles) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (carGrid) guiGridListSetItemText (carGrid, row, 1, carName, false, true) guiGridListSetItemText (carGrid, row, 2, tostring(v[2]), false, true) end function closeShop() if guiGetVisible(shopWindow) then guiSetVisible(shopWindow,false) showCursor(false) end end addEventHandler ("onClientGUIClick", closeButton, closeShop) addEvent ("viewGUI", true) function viewGUI () if (getLocalPlayer() == source) then guiSetVisible (shopWindow, true) showCursor (true) end end addEventHandler ("viewGUI", getRootElement(), viewGUI) function onClientWeapBuy (button, state, absoluteX, absoluteYe) if (source == weapButton) then guiSetVisible (shopWindow, false) showCursor (false) if (guiGridListGetSelectedItem (weapGrid)) then local itemName = guiGridListGetItemText (weapGrid, guiGridListGetSelectedItem (weapGrid), 1) local itemID = getWeaponIDFromName (itemName) local itemCost = guiGridListGetItemText (weapGrid, guiGridListGetSelectedItem (weapGrid), 2) triggerServerEvent ("weapBuy", getLocalPlayer(), itemID, itemCost, itemName) end end end addEventHandler ("onClientGUIClick", weapButton, onClientWeapBuy) function onClientCarBuy (button, state, absoluteX, absoluteYe) if (source == carButton) then guiSetVisible (shopWindow, false) showCursor (false) if (guiGridListGetSelectedItem (carGrid)) then local carName = guiGridListGetItemText (carGrid, guiGridListGetSelectedItem (carGrid), 1) local carID = getVehicleModelFromName (carName) local carCost = guiGridListGetItemText (carGrid, guiGridListGetSelectedItem (carGrid), 2) triggerServerEvent ("carBuy", getLocalPlayer(), carID, carCost, carName) end end end addEventHandler ("onClientGUIClick", carButton, onClientCarBuy) function makeVisible() get = guiGetVisible(shopWindow) if get == true then guiSetVisible(shopWindow,false) showCursor(false) else guiSetVisible(shopWindow,true) showCursor(true) end end bindKey("F7","down",makeVisible) that should work
  19. I don't get what do you mean with this...
  20. you failed while adding event handler, you put OnPlayerVehicleEnter and must be onPlayerVehicleEnter.
  21. this one: ratio = (tonumber(zombiekills)/tonumber(deaths))*10
  22. yes that data its correct, it still saying same error message...
  23. Sorry but we don't support for stealed scripts!!
×
×
  • Create New...