-
Posts
6,063 -
Joined
-
Last visited
-
Days Won
209
Everything posted by IIYAMA
-
Events only use the elements of the root which are useful. Since the player-elements are not very useful for rendering every frame............... you don't have to worry about that.
-
Board index ‹ Multi Theft Auto: San Andreas 1.x ‹ Support for MTA:SA 1.x ‹ Client Go to this section: https://forum.multitheftauto.com/viewforum.php?f=104
-
try: (not tested) infoz = createPickup(2000.5545654297, 1538.30, 13.7, 3, 1239, 0, 1) local x,y = guiGetScreenSize() local Text = "This is a Pirate Ship that gives" local Text2 = "Money If you Stay here you will" local Text3 = "Get a lot of Money........." local Text4 = "Created BY : PaulDK" local Text5 = "Keep Calm And Enjoy \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />" local lastInfoPickupHit = 0 local pickupInfoHandler = false function drawStuff() if lastInfoPickupHit < getTickCount() then if pickupInfoHandler then pickupInfoHandler = false removeEventHandler("onClientRender", root, drawStuff) end end dxDrawRectangle ( x/18, y/3, x/3.5, y/3, tocolor ( 0, 0, 0, 180 ) ) dxDrawText ( "INFORMATION", x/6.5, y/3, x, y, tocolor ( 255, 255, 255, 255 ), 0.8, "default-bold" ) dxDrawText ( Text, x/12, y/2.7, x, y, tocolor ( 255, 255, 255, 255 ), 0.9, "clear" ) dxDrawText ( Text2, x/12, y/2.5, x, y, tocolor ( 255, 255, 255, 255 ), 0.9, "clear" ) dxDrawText ( Text3, x/12, y/2.3, x, y, tocolor ( 255, 255, 255, 255 ), 0.9, "clear" ) dxDrawText ( Text4, x/12, y/1.6, x, y, tocolor ( 255, 255, 255, 255 ), 0.9, "clear" ) dxDrawText ( Text5, x/12, y/2, x, y, tocolor ( 255, 0, 0, 255 ), 0.9, "clear" ) end addEventHandler("onClientPickupHit", infoz, function (player,matchingDimension) if player == localPlayer and matchingDimension then lastInfoPickupHit = getTickCount()+5000 if not pickupInfoHandler then pickupInfoHandler = true addEventHandler("onClientRender", root, drawStuff) end end end)
-
Yes you can You can't. I have been working long with tables and I still do. I will recommend you to test it your self. >> http://www.lua.org/cgi-bin/demo local myTable = {["hi"]="lol",["hai"]="lol2"} for i,data in ipairs(myTable) do print(data .. " ipairs") end for i,data in pairs(myTable) do print(data .. " pairs") end AFAIK, there is a possibility using a metatable, but that is out of the question.
-
Yes, but then you can't still use the ipairs loop, without order the table first like I did. Why would you use tags when userdata/element can access easier? The best solution would be using 2 tables.
-
@Vinctus Because he can't access the data easily by using the team it self. @LinKin pairs doesn't have an order, even if it did then it wouldn't loop correctly since the keys are userdata's, which are random generated strings. team1 = getTeamFromName("ss") team2 = getTeamFromName("aa") team3 = getTeamFromName("dd") teamsTable[team1] = { name = "mmm", tag = "tag", order = 1} teamsTable[team2] = { name = "mmm", tag = "tag", order = 2} teamsTable[team3] = { name = "mmm", tag = "tag", order = 3} local orderTeams = {} for theTeam, theTeamData in pairs(teamsTable) do orderTeams[theTeamData.order]= {team = theTeam,data= theTeamData} end for i=1,#orderTeams do local whatEver = orderTeams[i] outputChatBox(tostring(whatEver.team) .. " Team: " .. whatEver.data.name ) end
-
Yes, if you played gta san in the past, you would know. Anyway all weapon skills, there is no tec9 in it, since the tec9 and uzi are almost equal to each other. 69: WEAPONTYPE_PISTOL_SKILL 70: WEAPONTYPE_PISTOL_SILENCED_SKILL 71: WEAPONTYPE_DESERT_EAGLE_SKILL 72: WEAPONTYPE_SHOTGUN_SKILL 73: WEAPONTYPE_SAWNOFF_SHOTGUN_SKILL 74: WEAPONTYPE_SPAS12_SHOTGUN_SKILL 75: WEAPONTYPE_MICRO_UZI_SKILL 76: WEAPONTYPE_MP5_SKILL 77: WEAPONTYPE_AK47_SKILL 78: WEAPONTYPE_M4_SKILL 79: WEAPONTYPE_SNIPERRIFLE_SKILL
-
Don't call me dude and good luck with your infinity timers. I am not here to script for you, I only give help to the ones that deserve it.
-
If you checked debugscript, you would have known.
-
getPedMoveState is clientside. You can't use that at serverside. Just simply replace: local moveState = getPedMoveState(sourcePlayer) local moveState = getDistanceBetweenPoints3D ( 0, 0, 0, getElementVelocity ( sourcePlayer ) ) > 1
-
Well, why don't you take a look?
-
If the argument isn't giving and the source isn't the player, then you can't. The only way to do so, is by editing the script that is doing it. (admin probably)
-
NNNNOOO WORKING.... OMG! I AM SO SEXY. addEventHandler("onPlayerChat",root, function(message,messageType) local playerAccount = getPlayerAccount ( source ) if not isGuestAccount ( playerAccount) then setAccountData(playerAccount,"xp",(getAccountData(playerAccount,"xp") or 0)+133) end end)
-
I think he means this. local counter = 1 function test() sound = playSound("playerpics/song.mp3") setTimer(function() counter = getSoundBPM() end, 50, 0) addEventHandler("onClientRender", root, bpmCounterDX) end addCommandHandler("testbpm", test) function bpmCounterDX() dxDrawRectangle(1062, 484, 15, 112/1000*counter, tocolor(184, 1, 5, 255), true) dxDrawRectangle(1099, 484, 15, 112/1000*counter, tocolor(156, 20, 161, 255), true) dxDrawRectangle(1135, 484, 15, 112/1000*counter, tocolor(7, 161, 175, 255), true) dxDrawRectangle(1173, 484, 15, 112/1000*counter, tocolor(172, 178, 5, 255), true) dxDrawRectangle(1209, 484, 15, 112/1000*counter, tocolor(7, 182, 2, 255), true) end
-
setAccountData(playerAccount,"xp",(getAccountData(playerAccount,"xp") or 0)+133)
-
May I ask, how can you login manually before you join?......... isGuestAccount(playerAccount,source,false) if isGuestAccount(playerAccount) then if not isGuestAccount(playerAccount) then
-
setPedHeadless(killer, true) setPedHeadless(source, true) For the rest debug the code manually, because it has to work.
-
dxDrawText You should read better, all the information is on the wiki.
-
Some servers are binding it, just make sure you unbind it after leaving the servers. There is no other solution I think.
-
and remove/disable: addEventHandler("onPlayerCommand",root,setAdminTeam) You don't need that.
-
https://wiki.multitheftauto.com/wiki/FileGetSize and start writing after that.
-
Ligt er maar net aan of je webserver goed werkt. Ja.