Jump to content

Xeno

Members
  • Posts

    728
  • Joined

  • Last visited

Everything posted by Xeno

  1. Hello, Before I start, I KNOW that there are tons of login panels on the community and I know that the community is flooded with them - but this has a lot more features than the other login panels on the community. Please do not comment saying that this is a useless piece of shit , I tried hard to get this totally right. Download: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3393
  2. local marker1 = createMarker(1525.3000488281,2834.3999023438,23.39999961853,"checkpoint",20,255,255,255,255) function marker(player) if (source == marker1) then local players = getElementsByType ( "player" ) timer = setTimer (function (player) if isPedInVehicle(player) then local veh = getPedOccupiedVehicle(player) end end end ,1000,0, player) end end addEventHandler ("onMarkerHit",getRootElement(),marker) addEventHandler ("onMarkerLeave",getRootElement(),function() if (source == marker1) then if isTimer(timer) then killTimer(timer) end end end)
  3. Xeno

    Question

    OOH! I didn't think it would work like that.... I think you guys mis-understood what I am trying to do.. I was just trying to make it so when I type /bomb, an object shoots from the front of the player and goes in the direction of where there facing... So for example if I was facing north, the object would go north, if I was facing south, the object would go south, do you get it?
  4. Xeno

    Question

    That outputs into the chat box: can't find player
  5. Xeno

    Question

    No errors, it just doenst spawn the object.
  6. Xeno

    Question

    Thanks, Only one problem, I get a bad arugement with getPlayerName.
  7. Set a colshape inside of the interiors that kills them when they enter.
  8. Xeno

    Question

    Sorry for my noobyness, but I've never done this before.. Something like this? function predBomb(player, element, meters) if not element or not isElement ( element ) then return false end if not meters then meters = 3 end local posX , posY , posZ = getElementPosition ( element ) local _ , _ , rotation = getElementRotation ( element ) posX = posX - math.sin ( math.rad ( rotation ) ) * meters posY = posY + math.cos ( math.rad ( rotation ) ) * meters return posX , posY , posZ bomb = createObject(1337,posX+1,posY,posZ) setTimer(setElementPosition,50,1,bomb,posX+1,posY,posZ) setTimer(setElementPosition,150,1,bomb,posX+3,posY,posZ) setTimer(setElementPosition,250,1,bomb,posX+6,posY,posZ) setTimer(setElementPosition,350,1,bomb,posX+9,posY,posZ) local xo,yo,zo = getElementPosition(bomb) setTimer(createExplosion,2000,1,xo,yo,zo, 0) end end end addCommandHandler("bomb", predBomb)
  9. Xeno

    Question

    So that script will move the Element 3 meters ahead of the person?
  10. Xeno

    Question

    I know, I just dont understand how im meant to make it move in that direction.
  11. Xeno

    Question

    This has totally confused me? I gave it ago... function predBomb(player) local x,y,z = getElementPosition(player) bomb = createObject(1337,x+1,y,z,findRotation(x,y,tx,ty) setTimer(setElementPosition,50,1,bomb,x+1,y,z) setTimer(setElementPosition,150,1,bomb,x+3,y,z) setTimer(setElementPosition,250,1,bomb,x+6,y,z) setTimer(setElementPosition,350,1,bomb,x+9,y,z) local xo,yo,zo = getElementPosition(bomb) setTimer(createExplosion,2000,1,xo,yo,zo, 0) end addCommandHandler("bomb", predBomb)
  12. Xeno

    Question

    How can I get the position infront of the player? I mean like, if I was moving an object, how would I make it so that it moves FORWARD in the direction the player is facing. And how would I see if the object hit a wall? So if the object was to hit a wall ,it would stop. Thanks in advance, Xeno.
  13. Thats fantastic! Thank you very muchly :3
  14. There's a problem with: triggerClientEvent( thePlayer,"onAlienSpawn",thePlayer ) It doesnt seem to trigger the client event
  15. I cant really show the hole Client, its quite big... But ill give you select parts that involve this code... function evenTeams(thePlayer) local ali = getTeamFromName ( "" ) pred = getTeamFromName ( "" ) local aliCount = countPlayersInTeam ( ali ) local predCount = countPlayersInTeam ( pred ) if aliCount == predCount then setPlayerTeam (source, pred) triggerClientEvent("onSpawn2", getRootElement()) --outputChatBox("Debug test2" , 255,0,0) elseif predCount > aliCount then triggerClientEvent("evenTeamsMessage2", getRootElement()) elseif predCount < aliCount then setPlayerTeam (source, pred) triggerClientEvent("onSpawn", getRootElement()) end end addEvent("evenTeams", true) addEventHandler("evenTeams", getRootElement(), evenPredTeams) function onSpawn2() guiSetVisible(ali, false) guiSetVisible(startImage, false) guiSetVisible(pred, false) guiSetVisible(label1, false) guiSetVisible(label2, false) guiSetVisible(label3, false) guiSetVisible(label4, false) guiSetVisible(label5, false) guiSetVisible(label6, false) showCursor(false) triggerServerEvent("spawnHerePlayer", getLocalPlayer()) end addEvent("onSpawn2", true) addEventHandler("onSpawn2", getRootElement(), onSpawn2) function spawnHerePlayer(source) fadeCamera(source, true) spawnPlayer(source, 0,0,5) setCameraTarget(source) setElementModel(source, 22) end addEvent("spawnHerePlayer", true) addEventHandler("spawnHerePlayer", getRootElement(), spawnHerePlayer) Its really confusing and hurts my head xP
  16. That is the same, it makes everyone spawn there.
  17. I made a script that changes the players skin on GUI Click and it triggers a serverSided event.... For some reason it works for everyone, I have tried changing the Element bit to "player" "thePlayer" "source" and it still doesnt work... Here is the code: function activateTheBomb() triggerServerEvent("bomb", getLocalPlayer()) end function bomb(source) fadeCamera(source, true) spawnPlayer(source, 0,0,5) setCameraTarget(source) setElementModel(source, 1) end addEvent("bomb", true) addEventHandler("bomb", getRootElement(), bomb)
  18. thanks, this actually really helped me, I've been wondering for a while how to do things like this..
  19. Ok Thanks for your help!
  20. Thanks for the information. Its nothing really big what Im using, just an image.... Well anyway, thanks.
  21. Xeno

    createfont

    For the meta its: <file src="font.ttf" />
×
×
  • Create New...