GanJaRuleZ Posted March 31, 2012 Share Posted March 31, 2012 Hai allz , i tried to make smth , but it seems i cannot get something Here are the functions i used : function exit(thePlayer,matchingDimension) setElementData(thePlayer,"LocationTurf",none) -- I added a outputDebugString to see what it does return , it always returns another table addEventHandler("onColShapeLeave",turfC1,exit) ... function enter(thePlayer,matchingDimension,owner) setElementData(thePlayer,"LocationTurf",turf1) addEventHandler ( "onColShapeHit", turfC1,enter) ... function lol(playerSource) local turfToAttack = getElementData(playerSource,"LocationTurf") -- Here its a debugstring . It outputs here if ( turfToAttack == turf1 ) then -- Here is the problem , it seems i can't pass it -- Here its another debugstring , it doesn't outputs here .. addCommandHandler("lol",lol) So , it's any way to see if a element data saved on a string , its equal with a string ? Thank you So , it doesn't pass there Link to comment
Kenix Posted March 31, 2012 Share Posted March 31, 2012 I not understand anything! https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/Element_data viewtopic.php?f=148&t=40809 Go ahead! Link to comment
GanJaRuleZ Posted March 31, 2012 Author Share Posted March 31, 2012 Kenix , i don't asked for sites where i can learn lua , i just want to know a way of doing it. If you don't understand it , please don't post Link to comment
Kenix Posted March 31, 2012 Share Posted March 31, 2012 (edited) You need learn! 292 posts only help .. If you like it ok. Edited March 31, 2012 by Guest Link to comment
GanJaRuleZ Posted March 31, 2012 Author Share Posted March 31, 2012 Actually Kenix , I readed that things pretty many times I just asked for a way of doing it , because i have no ideas in my head Link to comment
GanJaRuleZ Posted March 31, 2012 Author Share Posted March 31, 2012 Why would i read something again ? Its like doing like this : functionlua1 functionlua2 functionlua3 functionlua4 ... functionlua20 Instead of for i=1,20 do lua[i] end Got it ? Link to comment
drk Posted March 31, 2012 Share Posted March 31, 2012 oO What is it? Your code totally wrong Link to comment
Kenix Posted March 31, 2012 Share Posted March 31, 2012 t = { [1] = function( ) return 'GanJaRuleZ' end; [2] = function( ) return 'Learn' end; [3] = function( ) return 'Lua' end; } for i = 1, #t do print( t[ i ]( ) ) end --[[ Output: GanJaRuleZ Learn Lua ]] ? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now