-
Posts
6,063 -
Joined
-
Last visited
-
Days Won
209
Everything posted by IIYAMA
-
You didn't forget to add: function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end
-
True, but it would be a waste of your memory since you only use it for counting.
-
function saytext(thePlayer, command,argument) local player = getPlayerFromNamePart(argument) if player then outputChatBox ( "[ "..getPlayerName(player).." ] is laughing out loud!", root, 255, 0, 0, true) end end addCommandHandler ( "lol", saytext )
-
outputChatBox(#getElementsWithinColShape ( colShape, "player" ) )
-
objects are in the same dimension and interior?
-
myTable = {"Anubhav","IIYAMA","MTA","moderators", "super moderators", "admins"} --Is same as: myTable = { [1]="Anubhav", [2]="IIYAMA", [3]="MTA", [4]="moderators", [5]="super moderators", [6]="admins" } -- [1] is index number 1, defines the location of the information in a table. outputChatBox("test: " .. myTable[1]) --Anubhav outputChatBox("test: " .. myTable[2]) --IIYAMA outputChatBox("test: " .. myTable[3]) --MTA ----------------------------- for k,v in ipairs(myTable) do -- loop outputChatBox("index: " .. k .. ", Content: " .. v ) outputChatBox(v)--****** end Is same as:****** outputChatBox("Anubhav") outputChatBox("IIYAMA") outputChatBox("MTA") outputChatBox("moderators") outputChatBox("super moderators") outputChatBox("admins")
-
As far as I know, I helped you with a piece of code, I showed you were to start with scripting and I was the only person that was trying to help you. And still with disrespect? Pathetic little kid that you are.
-
Sorry, but you first need to learn the basic from lua. This isn't worth my time by writing all sample codes, when you can't learn anything from that because you don't know the laughing. Try to make simple things, like wiki mta samples. I will recommend you to leave this project until you are ready for it. and don't tell me you are, because we both know that isn't true.
-
when do you want him to spawn? P.s: the code you are showing to me is useless in your case.
-
local mySpawnTable = { {331.06286621094, 1855.9083251953, 7.828125}, -- fill in pls..... {216.45199584961, 1822.6893310547, 6.4140625}, --<-- {211.66558837891, 1810.6231689453, 21.8671875} -- <-- } Seriously was that so hard? By just filling it in..... If you don't understand it, then you know how to solve that problem. And it starts with: L . . R . . NG
-
local mySpawnTable = { {0,0,0}, -- fill in pls..... {0,0,0}, --<-- {0,0,0} -- <-- } function makePlayerSpawn (player) local spawnPoint = mySpawnTable[math.random(#mySpawnTable)] -- random spawnpoint spawnPlayer(player,spawnPoint[1],spawnPoint[2],spawnPoint[3]) end You can decide when he should spawn, that is up to you.
-
local font = dxCreateFont("font.ttf") ----------- dxDrawText( title, x, 0, x + width, y + 18, tocolor( tcolor[1], tcolor[2], tcolor[3], tcolor[4] * alpha ), 0.6, font, "left", "top", true, true, true ) Also make sure, the file is written in the meta.xml
-
https://wiki.multitheftauto.com/wiki/OnVehicleEnter https://wiki.multitheftauto.com/wiki/OnVehicleExit https://wiki.multitheftauto.com/wiki/Re ... romVehicle To lazy to search on wiki mta?
-
lol! Well, good that you found the problem, because it would be a nasty one to debug.
-
np.
-
Are you out side of the gta bounding box when this happens? 3000 x 3000 units. Because those bugs are also because of that.
-
As you can see player is already defined, in the parameters. outputChatBox("TEXT",player,255,69,0)
-
AFAIK, functions from serverside have less lagg impact, because they are using just 1 function. https://wiki.multitheftauto.com/wiki/LoadMapData And when you are loading them on clientside, you need a lot of functions per object to set their properties.
-
It seems they are seeing each other in light-sync mode. You also have this problem when they are close to each other? (the peds)
-
[quote name=..&G:..]Doesn't work Here is what I did in the other script that triggers the event function hideInterfaceComponents() triggerEvent("hideHud", getLocalPlayer()) loadSettings() saveLanguageInformation() end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), hideInterfaceComponents) 1 That other script was already running before you triggered the event? 2 And what happens when you do: triggerEvent("hideHud", getLocalPlayer()) triggerEvent("hideHud", root) 3 Both are 100% clientside? 4 And what will happen when you put the event in the same script?
-
local handler = false function myHudFunction () if handler then removeEventHandler("onClientRender",root,renderHud) handler = false else addEventHandler("onClientRender",root,renderHud) handler = true end end addCommandHandler("showhud",myHudFunction) addEvent("hideHud",true) addEventHandler("hideHud",root,myHudFunction) triggerEvent("hideHud", getLocalPlayer())
-
no, You're Welcome.
-
Then why are you saying it doesn't work..... when it does work..... When the zombies spawn some of them will end up in buildings etc. and will fall in to ground. So there will never be 50 at the same Area Also: addEventHandler ( "onResourceStart", getRootElement(), teste ) Should be: addEventHandler ( "onResourceStart", resourceRoot, teste ) Else with every resource that starts, there will be more zombies.
-
Skins between 26 and 41.....