-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
https://community.multitheftauto.com/index.php?p= ... ls&id=3736 Original: https://community.multitheftauto.com/index.php?p= ... ils&id=652
-
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 .
-
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.
-
Also you're doing: local isLoginTrue = logIn(getAccount(user,pass)) It should be: local isLoginTrue = getAccount(user,pass)
-
"logIn", "getAccount" functions are server side and your script is all client side.
-
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.
-
What...? I don't understand, you want a resource called "playericons"?
-
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 )
-
Race pickups aren't real "pickups", they are objects with colshapes.
-
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.
-
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.
-
Just use his script.
-
No, use dbQuery, dbExec and so on.
-
Just wondering: Why don't you use the DB functions? https://wiki.multitheftauto.com/wiki/DbConnect
-
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 .
-
"`" not "'". I'm not sure, but I think you must.
-
Example: local query = mysql_query( connect, "UPDATE `myTable` SET `money` = '5000' WHERE `accountName` = 'Castillo'" )
-
Postea tus scripts.
-
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'" )
-
You're welcome . P.S: No thanks, I have enough brothers, I don't want another ;P.
-
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 )
-
That's because in "race/racevoting_server.lua" it check's for Admin rights.
-
You mean like push every vehicle by name? If so, then you'll have to learn and edit that script.