Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. https://community.multitheftauto.com/index.php?p= ... ls&id=3736 Original: https://community.multitheftauto.com/index.php?p= ... ils&id=652
  2. My FPS is always 60. My settings: Graphic Effects: High Shadows: All Shadows Blood Particles: 1000 My PC specs: AMD Athlon II X2 250 Processor (2 CPUs), ~3.0GHz 2GB RAM. NVIDIA GeForce 8100 / nForce 720a, 881MB Suggestion: Add a dead message, would be cool .
  3. That's because you're creating the XML file every time the resource starts, use fileExists to check if the file exists, if not then create it.
  4. Also you're doing: local isLoginTrue = logIn(getAccount(user,pass)) It should be: local isLoginTrue = getAccount(user,pass)
  5. "logIn", "getAccount" functions are server side and your script is all client side.
  6. You put: "setPedstat", Lua is case sensitive, see your error? it has to be: "setPedStat". Also your table name is "stats", but then you're using "stat". local stats = { ["DanWesson"] = {[69] = 1000, [70] = 1000, [71] = 1000, [72] = 1000, [73] = 1000, [74] = 1000, [75] = 1000, [76] = 1000, [77] = 1000, [78] = 1000, [79] = 1000, [160] = 1000}, } function changePedStat ( theSpawnpoint, theTeam ) local account = getPlayerAccount(source) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "DanWesson" ) ) ) then for stat, value in pairs(stats["DanWesson"]) do setPedStat(source, stat, value, true) end end end addEventHandler ( "onPlayerSpawn", getRootElement(), changePedStat ) Also you call your function "changePedStat" but then you add the event handler to "setPedStat". NEVER CALL A FUNCTION LIKE A MTA NATIVE FUNCTION.
  7. Castillo

    playericons

    What...? I don't understand, you want a resource called "playericons"?
  8. Your only problem is that you used "thePlayer" instead of "source" in getPlayerAccount, but I changed some things to make your script easier to use. local weapons = { ["Admin"] = {[1] = 9999, [4] = 9999, [24] = 9999, [27] = 9999, [32] = 9999, [31] = 9999, [34] = 9999, [36] = 9999, [39] = 9999, [40] = 9999, [44] = 9999, [46] = 9999}, } function giveWeaponsOnSpawn ( theSpawnpoint, theTeam ) local account = getPlayerAccount(source) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then for weapon, ammo in pairs(weapons["Admin"]) do giveWeapon(source, weapon, ammo, true) end end end addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeaponsOnSpawn )
  9. Race pickups aren't real "pickups", they are objects with colshapes.
  10. And how do you expect the script to know which car do you want to push? If you want something different then learn and do it by yourself.
  11. I passed 3 missions, but now I'm stuck in mission 3 or 4, is not possible to pass that level, the roof over fire is too low to jump it.
  12. No, use dbQuery, dbExec and so on.
  13. Just wondering: Why don't you use the DB functions? https://wiki.multitheftauto.com/wiki/DbConnect
  14. Good job . I haven't passed the level 1, I let my brother play it, he said: "Ah, this is really easy.", and took like 100 deaths to pass the first spikes .
  15. "`" not "'". I'm not sure, but I think you must.
  16. Example: local query = mysql_query( connect, "UPDATE `myTable` SET `money` = '5000' WHERE `accountName` = 'Castillo'" )
  17. I don't know if you can use the "?" in Ryden's MySQL. local query = mysql_query( connect, "UPDATE table SET column = 'Test' WHERE column = 'Example'" )
  18. You're welcome . P.S: No thanks, I have enough brothers, I don't want another ;P.
  19. GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow( 423,220,477,311,"Level_System v3.0 ",false ) guiWindowSetMovable( GUIEditor_Window[1],false ) guiWindowSetSizable( GUIEditor_Window[1],false ) guiSetVisible( GUIEditor_Window[1],false ) GUIEditor_Grid[1] = guiCreateGridList( 9,21,264,281,false,GUIEditor_Window[1] ) guiGridListSetSelectionMode( GUIEditor_Grid[1],2 ) col = guiGridListAddColumn( GUIEditor_Grid[1],"Players",0.90 ) GUIEditor_Label[1] = guiCreateLabel( 286,43,144,23,"Level:",false,GUIEditor_Window[1] ) guiLabelSetColor( GUIEditor_Label[1],0,255,0 ) guiSetFont( GUIEditor_Label[1],"clear-normal" ) GUIEditor_Label[2] = guiCreateLabel( 284,95,102,21,"EXP:",false,GUIEditor_Window[1] ) guiLabelSetColor( GUIEditor_Label[2],0,0,255 ) guiSetFont( GUIEditor_Label[2],"clear-normal" ) GUIEditor_Image[1] = guiCreateStaticImage( 266,152,182,146,"images/mtalogo.png",false,GUIEditor_Window[1] ) if (col) then for _, player in pairs( getElementsByType 'player' ) do row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText( GUIEditor_Grid[1],row,col,getPlayerName( player ),false,false ) end end addEventHandler( 'onClientGUIClick',root, function( ) if (source == GUIEditor_Grid[1]) then local theRow, theCol = guiGridListGetSelectedItem( source ) if (theRow and theCol and theRow ~= -1 and theCol ~= -1) then local playerName = guiGridListGetItemText( source,theRow, theCol ) local player = getPlayerFromName(playerName) if (player and isElement(player)) then local theEXP = getElementData(player, "ExP") or 0 local theLevel = getElementData(player, "Level") or 0 guiSetText(GUIEditor_Label[1], "Level: ".. tostring(theLevel)) guiSetText(GUIEditor_Label[2], "EXP: ".. tostring(theEXP)) else guiSetText(GUIEditor_Label[1], "Level:") guiSetText(GUIEditor_Label[2], "EXP:") end else guiSetText(GUIEditor_Label[1], "Level:") guiSetText(GUIEditor_Label[2], "EXP:") end end end ) bindKey( 'F7','down', function( ) guiSetVisible( GUIEditor_Window[1], not guiGetVisible( GUIEditor_Window[1] ) ) showCursor( guiGetVisible( GUIEditor_Window[1] ) ) end )
  20. That's because in "race/racevoting_server.lua" it check's for Admin rights.
  21. You mean like push every vehicle by name? If so, then you'll have to learn and edit that script.
×
×
  • Create New...