-
Posts
6,063 -
Joined
-
Last visited
-
Days Won
208
Everything posted by IIYAMA
-
There is one other, render them at position. "onClientPreRender" setElementPosition
-
Not everybody is a scripter. So if you really want to sell this, spend some time on use ability.
-
Beta release: (1.0.2) Subscribed scripters, check your message folder! Video of pre version 1.0.2
-
As promised, your names are on it: If I missed anyone, let me know.
-
Nice! Don't forget to check out this page, for scripters like you: https://forum.multitheftauto.com/viewtopic.php?f=108&t=98182
-
Great,
-
[quote name=..&G:..] local accID = getAccountID(username) or 0 dbExec(connection, "INSERT INTO `userdata` SET `userid`='" .. accID .. "', `online`='0', `username`='" .. username .. "', `usergroupid`='0', `registered`='1', `admin`='0', `joined`='" .. getTheTime() .. "', `team`='nil', `serial`='"..getPlayerSerial(player).."', `ip`='"..getPlayerIP(player)"', `lastvisit`='"..getTheTime().."', `cc`='EN', `playtime`='0', `settings`='0', `stunts`='0', `tuning`='0', `shooterlevel`='0', `clan`='0', `arena`='0', `language`='Enlgish', `autosave`='1', `special`='0', `nickname`='"..getPlayerName(player).."', `dmRak`='0', `raceRank`='0', `ddRank`='0', `trialsRank`='0', `runRank`='0'") Any ideas why I keep getting "Attempt to call a string value" here...? Thanks. And the data must be added as parameters, not as the query string. dbExec( connection, [color=#FF0000]"INSERT INTO table_name VALUES (?,?,?)"[/color][color=#0000FF][b],[/b][/color] [color=#008000]"aaa"[/color][color=#0000FF][b],[/b][/color] [color=#008000]"bbb"[/color][color=#0000FF][b],[/b][/color] [color=#008000]10[/color] ) query string parameters/data separate by comma https://wiki.multitheftauto.com/wiki/DbExec
-
There is another solution, open in your admin tag resource, the serverside file: https://wiki.multitheftauto.com/wiki/WasEventCancelled https://wiki.multitheftauto.com/wiki/OnPlayerChat When the event onPlayerChat gets executed, use this: if not wasEventCancelled() then -- all other code inside that function end It will checks if the the event was cancelled. If it is not cancelled, then show the admin tags. (if the event "onPlayerChat" is cancelled, the typed text doesn't get added in to the chatbox)
-
Controls? local playersTime = 0 local playersTimer local secondsHold = 5 -- And after the 5 seconds It would be good if it puts in the Chat "You have pressed the key H X times" addEventHandler( "onClientKey", root, function(button, press) local ckeys = getBoundKeys("crouch") if ckeys and ckeys[button] and press then if not isTimer(playersTimer) then outputDebugString("start playersTimer") playersTimer = setTimer(function() outputChatBox("You have pressed the crouch key "..playersTime.." times") playersTime = 0 end, secondsHold*1000, 1) else playersTime = playersTime + 1 outputDebugString("playersTime + 1 = " .. playersTime) end end end) Custom keys? local playersTime = 0 local playersTimer local secondsHold = 5 -- And after the 5 seconds It would be good if it puts in the Chat "You have pressed the key H X times" local whichKey = "h" addEventHandler( "onClientKey", root, function(button, press) if whichKey == button and press then if not isTimer(playersTimer) then outputDebugString("start playersTimer") playersTimer = setTimer(function() outputChatBox("You have pressed the key " .. whichKey .. " " ..playersTime.." times") playersTime = 0 end, secondsHold*1000, 1) else playersTime = playersTime + 1 outputDebugString("playersTime + 1 = " .. playersTime) end end end)
-
This is a part of my syncro resource, which converts weapon stats to: poor std and pro. local weaponStats = { [22]={69,40},[23]={70,500}, [24]={71,200},[25]={72,200},[26]={73,200}, [27]={74,200},[28]={75,50},[29]={76,250}, [30]={77,200},[31]={78,200},[32]={76,50}, [33]={79,300},[34]={79,300} } local weapon = 22 local weaponState, skill = weaponStats[weapon], "pro" if weaponState then local stats = getPedStat ( localPlayer, weaponState[1] ) if stats < 999 then skill = stats >= weaponState[2] and "std" or "poor" end end I hope this can help you as inspiration.
-
The version 1.0.2 will be released within 10 days. Which includes mostly bug fixes. Bugs already fixed in 1.0.2: Hidden folders. [gamemodes]\[hidden] Debug information without line numbers. And more... Improvements No delay when showing information as you click on the grid list, except for the line preview and resource state that is requested. New Starting and stopping resources? Status running Status not running
-
Ah oke. You received it?
-
Hey @CodyL, It seems you disabled your incoming pm's somehow. So check your mail instead! There is a link for the download, enjoy! (try to enable your incoming pm's 'settings', for updates in the future)
-
use the serial as key: local serialToPlayer = {} serialToPlayer[getPlayerSerial(source)] = source if serialToPlayer[getPlayerSerial(thePlayer)] then
-
Beta release: (1.0.1) Subscribed scripters, check your message folder! Upcoming features, improvements and bug fixes: Stop and start/restart resources with errors/warnings Minimize window Download reduction (debug information) Stops the data transfer when reaching the maximal amount of transfers Custom ID system, which will give more options for other features. Move the window Saving the planet! Scale the window Fixed bug: not showing the cursor when the window is not active Zero state Local saving settings Serverside: collecting errors and warnings from both sides, so you can also check errors/warnings from other players.(95%) + ugly GUI (Serverside: collecting errors and warnings from both sides) database? Direct line edit based on the error. Exporting to the File editor resource from Gothem. ■ Finished ■ Working on ■ Waiting... Now you can move the window, included some extra options: Move the window by simply dragging it to anywhere you want! (when your cursor is at the header) Auto adjust to the borders of the screen (left and right) When the window is used on the right side of the screen, the debug information will align on the right side of the window. Now you can scale the window: Inform the user, when the window can be scaled. When you are scaling the window. View debug information from other clients and save them while your away. (does not have a database yet, so keep it running) Important! from (1.0.1): The key combination to show the cursor is now: Left shift + Z
-
nope, if [b][color=#FF0000]not[/color][/b] getPlayerTeam(player) then -- set in team Make sure you update the version correctly.
-
addCommandHandler("dd", function(player) if not getPlayerTeam(player) then table.sort(theTeams, sortAtPlayersInTeam) local teamName = theTeams[1] local team = getTeamFromName(teamName) if team then -- does the team exist? if teamName == "US Army" then setPlayerTeam(player, getTeamFromName("US Army")) spawnPlayer(player, 1585.5485839844, -1677.8289794922, 5.8969912528992) setCameraTarget(player, player) fadeCamera(player, true) setElementModel(player, 163) giveWeapon(player, 31, 500) giveWeapon(player, 29, 200) giveWeapon(player, 24, 100) setPlayerNametagColor(player, 221, 177, 0) blipua = createBlipAttachedTo(player, 0, 2, 221, 177, 0) outputChatBox("#0000ff(Mission) #8e8c00Kill the #328c6eDrug Lord #8e8c00before he delievers the drugs!", player, 255, 255, 255, true) elseif teamName == "Drug Dealers" then setPlayerTeam(player, team) spawnPlayer(player, 1484.75549, -666.62592, 95.60126) setCameraTarget(player, player) fadeCamera(player, true) setElementModel(player, 29) giveWeapon(player, 30, 500) --Give him a weapon pack giveWeapon(player, 23, 50) giveWeapon(player, 25, 30) setPlayerNametagColor(player, 168, 0, 255) blipdd = createBlipAttachedTo(player, 0, 2, 168, 0, 255) outputChatBox("#008AB0(Mission) #8e8c00Help the #328c6eDrug Lord #8e8c00to deliever the drugs!", player, 255, 255, 255, true) end end else outputChatBox("#FF0000Error: You can not change your team now", player, 255, 255, 255, true) end end)
-
This will fix those errors. [2016-04-21 00:08:05] ERROR: [gameplay]\(SARS)DugTrans\JobLS.lua:13: Valid wanted levels are between 0 and 6 inclusive setPlayerWantedLevel(attackerLV, math.min(getPlayerWantedLevel(attackerLV)+4, 6)) [2016-04-21 00:08:05] WARNING: [gameplay]\(SARS)DugTrans\JobLV.lua:14: Bad argument @ 'destroyElement' [Expected element at argument 1, got nil] [2016-04-21 00:08:05] WARNING: [gameplay]\(SARS)DugTrans\JobLV.lua:15: Bad argument @ 'destroyElement' [Expected element at argument 1, got nil] [2016-04-21 00:08:05] WARNING: [gameplay]\(SARS)DugTrans\JobLV.lua:16: Bad argument @ 'destroyElement' [Expected element at argument 1, got nil] if isElement(markerLV) then destroyElement ( markerLV ) end if isElement(blipLV) then destroyElement ( blipLV ) end if isElement(carlv) then destroyElement ( carlv ) end But about this bug, you probably have to ask the owner to fix it. Because I am not going to check and rewrite the entire resource.
-
https://wiki.multitheftauto.com/wiki/ToJSON https://wiki.multitheftauto.com/wiki/FromJSON
-
addCommandHandler("dd", function(player) if getPlayerTeam(player) then -- the rest of the code. else outputChatBox("You can not change your team now!", player) end end)
-
Then you are already in a team or you added it wrong.
-
if getPlayerTeam(player) then --... else outputChatBox("You can not change your team now!", player) end
-
News: Starting cooperation with Gothem and his File editor resource. Direct line edit based on the error. Click the link below for more information about this resource: https://forum.multitheftauto.com/viewtopic.php?f ... or#p876547 Example scenario, why this feature might have a lot of value: A user finds an error in one of his resources. He clicks on the error and it will show information about it. Also next to the information a button becomes active, a button to edit the file of the responsible resource. He clicks on the button, the file editor opens up and scrolls down to the line of the error.
-
local playersInTeamA = #getPlayersInTeam (teamA) local playersInTeamB = #getPlayersInTeam (teamB)
-
https://wiki.multitheftauto.com/wiki/On ... eCollision Possible, (there are some vehicles that don't work, especially planes) See my bug report: https://bugs.multitheftauto.com/view.php?id=8265