-
Posts
965 -
Joined
-
Last visited
Everything posted by DakiLLa
-
may be you need to translate 'money' argument from string to number? money = tonumber( money ); and in your example your trying to concatenate number value with string..
-
you have placed wrong number in function createPickup. function pickup ( player ) local x,y,z = getElementPosition ( player ) createPickup ( x + 5, y, z, 0, 100 ) end addCommandHandler ( "heal", pickup ) if we take a look on a wiki... createPickup ( x, y, z, type, amount/weapon/model ) you should place an 'amount' of your health, if you have a HEALTH - type pickup, with max value - 100. And you have placed a model as i can see..
-
great, ty man, works perfect. next time i will read wiki more carefully
-
Well, the type of the script is 'client' as should be. I've placed debug lines and loaded Dff, but still nothing... addEventHandler ( "onClientResourceStart", gResRoot, function () --Lets relplace them! dff = engineLoadDFF ( "billbrdlan2_03.dff", 0 ) outputDebugString ( "Dff loaded" ) txd = engineLoadTXD ( "billbrd01_lan2.txd" ) outputDebugString ( "Txd loaded" ) engineImportTXD ( txd, 4730 ) outputDebugString ( "Txd replaced" ) dffTwo = engineLoadDFF ( "vgeastbillbrd03.dff", 0 ) outputDebugString ( "Dff2 loaded" ) txdTwo = engineLoadTXD ( "vgebillboards.txd" ) outputDebugString ( "Txd2 loaded" ) engineImportTXD ( txdTwo, 9191 ) outputDebugString ( "Txd2 replaced" ) end ) i see all debug lines, so, script isnt breaking anywhere.. May be it's a lag of dp-s so i dont need to test it on dp, and may be i should to wait for 1.0.. idk.
-
hi. i've added new objects on map and i want to replace a texture of 2 object models.. I thought that i've made it correctly, but i still have stock textures on this objects.. I have placed two txd's in my .zip resource, written meta and lua script..Resource works withouat ANY errors, but nothing happens.. I've checked names of txds that i've placed into resource, they have the same names as in meta. Ok, here is a code from meta and lua files: meta: <file src="blbr1.txd" /> <file src="blbr2.txd" /> client: gResRoot = getResourceRootElement ( getThisResource () ) addEventHandler ( "onClientResourceStart", gResRoot, function () --Lets relplace them! blbrd1 = engineLoadTXD ( "blbr1.txd" ) blbrd2 = engineLoadTXD ( "blbr2.txd" ) engineImportTXD ( blbrd1, 4730 ) engineImportTXD ( blbrd2, 9191 ) end ) can anybody help me solve this problem?
-
eh? man, you rly should to start learning english.. stupid creating of themes without description isnt good idea i think..
-
EDIT: oops! wrong link
-
ah..well, lets say it again: /register and /login are hard-coded commands, and this resource - graphical and comfartable device for register and log in.. Have you tryed to start this resource on your server ?
-
and what is the source of your function? i think that function cant gets the source of function (sounds not good ) so thats why you have a warning.. May be you should get all players on server and get their account datas? Something like this: function test () for k,players in ipairs (getElementsByType("players")) do local account = getClientAccount ( players ) if not isGuestAccount (account) then local job = getAccountData ( account, "Job" ) local team = getAccountData ( account, "Team" ) end end end setTimer ( test, 10000, 1 )
-
eh..recording?? what are you talking about?
-
"rejstrowania" lol may be he's looking for this?
-
hmm, i think i will have more lines in script anyway with your example, LordAzamth, than in my version.. so it will more easyer to put again and again with copypast "triggerServer..." Edit: but anyway, thx for replies, guys, may be i will use your examples for other points in my next projects..
-
hi again. Well, i have next question: i have 12 buttons in my gui and ONE event that must be triggering after clicking on any button. But i dont want to write triggerServerEvent after each "click check" I mean this: there are the buttons: z_one = guiCreateButton ( ... ) z_two = guiCreateButton ( ... ) z_three = guiCreateButton ( ... ) ..... etc etc etc... and onClientGUIClick event: addEventHandler ( "onClientGUIClick", gResRoot, function () if source == z_one then triggerServerEvent ( "buyZone", gMe ) elseif source == z_two then triggerServerEvent ( "buyZone", gMe ) elseif source == z_two then triggerServerEvent ( "buyZone", gMe ) elseif source == z_three then triggerServerEvent ( "buyZone", gMe ) elseif source == z_four then triggerServerEvent ( "buyZone", gMe ) .........etc etc etc.............. ................................... end ) can you tell me an easy way to write this part of script in more compact form? thx for replies
-
thx a lot, gamesnert, for all help works perfect
-
ok, thx, it outputs only one message now. But another problem: my example counts all objects on server (thats why i have ~800 objects ) , not only objects with ID 649. How to count objects only with current id? i have getObjectModel line but it placed in wrong place i think.
-
this problem is as a bug in dp i think try to see here
-
ehm guys..one problem here.. i'm getting something other than amount of objects addCommandHandler ( "test", function ( ) local objects = getElementsByType ( "object" ) objAmount = #objects for k,object in ipairs (objects) do if getObjectModel (object) == 649 then outputChatBox ( "We have "..objAmount.." objects" ) end end end ) if it's (for example) 4 objects i have next: We have 805 objects We have 805 objects We have 805 objects We have 805 objects can you fix my mistakes ?
-
hey all how can i count elements of a specified type on server ? something like this: i have a number of objects but i dont know how many of them i have. How to count them?
-
hi. i have one problem here.. i want to get a player with max value of points and print his name. Lets suppose that we have 3 players with their points: First - 500 points Second - 1000 points Fird - 2000 points how to check which player has more points than all others players? May be create a table with players? if it's, how to make this points-check? Thx for replies
-
yee, thx ace, thats what i need
-
well another question. If i want to destroy block then i need to remove it from table as i think cse i have warnings when i try to destroy it again (object destroyed, but not removed from table so, you cant destroy nothing). How to do this ? (with my examples ofcourse, with board { } table..)
-
lol, really working perfect.. i've just tryed to create an object and attach it to block and it works.. well, may be i will have some questions later, so, thx rob anyway
-
oh, ye, i see it too.. but sorry, my mistake well, i have nothing when i write 'test' command.. no errors, no warnings..
