Jump to content

squar

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by squar

  1. Oh i fixed it!. Thank you very much, I really appreciate your help. I messed up with the source and localPlayer.
  2. It didnt work. local data = aTable [ source ] outputChatBox("test") if ( type ( data ) == "table" ) then I tried an output under the "if" and it didnt work. However above did work, so i guess its something wrong with that line
  3. Yes. I want it tabled since it will be creating a new object with blip and colsphere like every sec. Therefore I want it to be like; when I hits the col, it will destroy the blip, col and object. Of course there's other things added to that than it getting deleted only. Its just that part I'm having problems with.
  4. I don't have the knowledge to do that. I just tried throwing them all in a table like showed above, and some other weird ways. However, that ended with a failure you see. That's why I would like you guys to give me a clue about how to do it
  5. That was exactly how i wanted it to be. Its just the fact that i can't do that
  6. Oh, what if i've got an object using createObject? My bad... I should've pointed out that I wanted the col and blip attached to the object. However, the blip isn't a problem now. Since it will be deleted if i get the object deleted. You know how i can fix that? The plan though is to get the object, blip and colsphere deleted when i hit that colsphere...
  7. It works ;D Thank you very much
  8. It says TOTAL GATES: 0, then 5 sec later the XML is loaded. As you see i used setTimer on 5 sec.
  9. It outputs nothing, it needs to be triggered i think
  10. Hey! It worked , thank you! I didnt mention that i have a remove all objects function too. It got bugged when you made that new setup, and I'm not sure how to fix it. I hoped you could give a little hint about how to do it. Again, thanks!
  11. local objectsSpawned = {} function createTheObjects( thePlayer,objectID,objectPosX,objectPosY,objectPosZ, objectRotX, objectRotY, objectRotZ ) obj = createObject( thePlayer,objectID,objectPosX,objectPosY,objectPosZ, objectRotX, objectRotY, objectRotZ ) setElementDoubleSided (obj,true) if (not objectsSpawned[client]) then objectsSpawned[client] = {} end table.insert ( objectsSpawned [ client ], obj ) end addEvent("createObjects",true) addEventHandler("createObjects",root,createTheObjects)
  12. bump Anyone know how i can set the objects in a table which saves the object to the player only, or at least make it removeable by the placer only
  13. Ok. ive been trying to get that working, but there's always a problem. I call the objects i make for obj, like obj = createObject etc.. Do any of you know the problem? I'd appreciate your help
  14. local gate1 = createObject ( 969, -488.75805664063, -562.94116210938, 24.461265563965, 0, 0, 180 ) local gate2 = createObject ( 969, -488.5793762207, -562.96948242188, 24.451913833618, 0, 0, 0 ) local gatecol = createColCircle ( -488.6, -562.94116210938, 7 ) function opengates( thePlayer ) local theTeam = getPlayerTeam ( thePlayer ) if getTeamName ( theTeam ) == "FabulousBloodzGang" then moveObject (gate1, 5000, -495, -562.94116210938, 24.461265563965 ) moveObject (gate2, 5000, -481, -562.96948242188, 24.451913833618 ) end end addEventHandler( "onColShapeHit", gatecol, opengates ) function closegates( thePlayer, matchingDimension ) if ( getTeamName(getPlayerTeam(thePlayer)) == "FabulousBloodzGang" ) then moveObject (gate1, 5000, -488.75805664063, -562.94116210938, 24.461265563965 ) moveObject (gate2, 5000, -488.5793762207, -562.96948242188, 24.451913833618 ) end end addEventHandler( "onColShapeLeave", gatecol, closegates ) You mean like this?
  15. I got a table in the client side one. By the script i have, I can use the delete all function, but it deletes the ones other people has placed as well. Is it a way to make the server side one deleting the objects the PLAYER has placed, without having the table on the server side one?
  16. function createWorldObject ( thePlayer,objectID,objectPosX,objectPosY,objectPosZ) local rx,ry,rz = getElementRotation ( source ) obj = createObject(thePlayer,objectID,objectPosX,objectPosY,objectPosZ) setElementDoubleSided (obj,true) setElementRotation(obj,rx,ry,rz) function removeAllObjects () for k,v in ipairs(getElementsByType ( "object", getResourceRootElement(getThisResource()))) do destroyElement (v) end end addEvent("onRemoveAll",true) addEventHandler("onRemoveAll",root,removeAllObjects) This script almost works perfectly. When I press the remove all button in my gui, it deletes the objects other player has placed as well. I was wondering how to fix it like when a player hits the delete all button, it deletes the object he has placed only. A hint would be great
  17. function createWorldObject ( thePlayer,objectID,objectPosX,objectPosY,objectPosZ) local rx,ry,rz = getElementRotation ( source ) obj = createObject(thePlayer,objectID,objectPosX,objectPosY,objectPosZ) setElementRotation(obj,rx,ry,rz) end addEvent("createObject",true) addEventHandler("createObject",root,createWorldObject) function removeLastObject () destroyElement(obj) end addEvent("onRemoveLast",true) addEventHandler("onRemoveLast",root,removeLastObject) function removeAllObjects () destroyElement () end addEvent("onRemoveAll",true) addEventHandler("onRemoveAll",root,removeAllObjects) I'm not sure how I can make a remove All objects function. I was trying to remove all objects I have PLACED. It seemed to be a little bit complicated, and was wondering if any of you could have a look on it, and probably give a little hint about what to do. This is server side, obviously...
  18. This function is serverside. The client side one is gonna trigger this one using onClientGUIClick and triggerServerEvent
×
×
  • Create New...