Jump to content

A3kri

Members
  • Posts

    84
  • Joined

  • Last visited

Everything posted by A3kri

  1. thnx, I used your serversided function, that what I needed x.x I used F7 to show/~ the gui
  2. Hellow .. I made gui and i can make it visible using the F7. I want it to be visible using triggerClientEvent .. so I make onPlayerSpawn and the event gets triggered addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(166, 96, 545, 402, "credits", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1],false) GUIEditor.staticimage[1] = guiCreateStaticImage(16, 31, 152, 127, "banshee.png", false, GUIEditor.window[1]) end ) bindKey('F7','down', function () guiSetVisible ( GUIEditor.window[1],not guiGetVisible ( GUIEditor.window[1] ) ); showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end ) this is the client sided. function player_Spawn ( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension ) triggerClientEvent ( "onGreeting", getRootElement(), "Hello World!" ) --wiki end addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn ) and this is the server sided I used wiki but couldn't get it.
  3. thanks, what I did was i set them to nil then re set them to a value which made it possible =)
  4. Hello .. I have an if statement inside function1 which has two variables, source and source2. is it possible to store these to variable for use in function2? function 1 ( ) if ( xxx == 1) then outputChatBox (getPlayerName(source1) .. "< source1 " .. getPlayerName(source2) .. "< source2 ", getRootElement (), 255, 170, 0 ) toggleControl (source1, "fire", false ) end end function 2( ) givePlayerMoney(source1, 10000) end is it possible?^
  5. A3kri

    getLocalPlayer

    yes i solved it x.x but you answered before i edit lol thanks very much
  6. A3kri

    getLocalPlayer

    thanks, it's fine.
  7. A3kri

    getLocalPlayer

    I know this may sound stupid but Idk why it doesn't work x.x local myMarker = createMarker ( -710.25555419922, 962.29443359375, 12.410507202148, "cylinder", 1.5, 255, 0, 0, 255 ) addEventHandler ( "onClientMarkerHit", myMarker, function () outputChatBox ( " hi " .. getPlayerName(getLocalPlayer()), getRootElement(), 100, 100, 100, true ) end) nothing happens while it should print hi xxxxx
  8. السلام عليكم .. رمضان كريم .. عندي عصا الغولف الي رقمها 2 golfclub وبغيت لين ضربت إبها شخص player يصير .. outputChatBox ( player .. was hit with a goldclub. LOOL, source ) أتمنى فهمتون عليي
  9. oh, so I cant make when I hit a car with nightstick it blows up ?
  10. Hello .. addEventHandler ( 'onClientWeaponFire', getLocalPlayer(), function ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if ( weapon == 3 ) and ( getElementType ( hitElement ) == 'vehicle' ) then blowVehicle ( hitElement ) end end ) it should blow ay vehicle i hit by my nightstick .. but nothing happens
  11. A3kri

    interior help

    thanks, my problem was in the "6" x.x
  12. A3kri

    interior help

    local Marker = createMarker ( 2244.4313964844, -1665.2449951172, 15.4765625, "arrow", 1.5, 255, 255, 0, 255 ) addEventHandler("onClientMarkerHit",Marker, function() setElementPosition ( getLocalPlayer(), 297.4460, -109.680, 1001.5160 ) end) this is it.
  13. A3kri

    interior help

    Hello .. I made a marker and with setElemeentPosition I want the player to transfer to the ammu shop ID 6: Ammu-Nation 3 297.4460 -109.9680 1001.5160 when I set the coordinates in the setElementPosition it transfer me to another place not the ammu place
  14. thanks both, the error I had was i used onMarkerHit and i should've used onClientMarkerHit
  15. Oh, I found them .. http://wiki.multitheftauto.com/wiki/Interior_IDs thanks =)
  16. Hi .. I made an arrow .. I want when i go to the arrow by setelementposition to transfer me to the skin shop/clothes shop inside. What is the coordinates of the clothe shop ? Im not sure but i think something called interior is related, i have a mod called interior in my mods.
  17. Hello .. I made a cylinder local myMarker = createMarker ( 2244.4313964844, -1665.2449951172, 15.4765625, "cylinder", 1.5, 255, 255, 0, 255 ) now how do I make when I get inside the cylinder a gui I made shows up? now i can bring it up by a commandhandler addCommandHandler("ss", skintime, false, false) how do I make it by entering the cylinder ? *note that it's in my client side
  18. it's working great, thanks.
  19. Hello .. I'm a biggener lua developer, I'm having a problem in one of my scripts I'm trying to build. function lookright() local skin = getPedSkin(client) local playerTeam = getPlayerTeam(client) if (playerTeam = getTeamName(ekri)) then if (client) then setPedSkin(client, skin+1) end else setPedSkin(client, 50) end end addEvent("right", true) addEventHandler("right", getRootElement(), right) the problem is in if (playerTeam = getTeamName(ekri)) then is it right? I want if the player team is ekri then ... atm the skin of the player always become 50 .. so that means that knowing if the player is in ekri team is wrong thats why the script goes to the else function which sets the skin to 50 not +1 ---------- also this doesn't work, outputChatBox (getPlayerTeam(client), client ) it should output a messsage with the player's team ..
  20. A3kri

    getPlayerTeam help

    Hello .. I'm a biggener lua developer, I'm having a problem in one of my scripts I'm trying to build. function lookright() local skin = getPedSkin(client) local playerTeam = getPlayerTeam(client) if (playerTeam = getTeamName(ekri)) then if (client) then setPedSkin(client, skin+1) end else setPedSkin(client, 50) end end addEvent("right", true) addEventHandler("right", getRootElement(), right) the problem is in if (playerTeam = getTeamName(ekri)) then is it right? I want if the player team is ekri then ...
  21. Hello .. I'm a beginner lua developer, but I have a background in javascript. I want when the player types health his health becomes 100% and he gets 150 taken freom his money, else if he don't have 150 his health doesn't become 100% but an outputChatBox gets printed. this is what I ended up to local money = getPlayerMoney(thePlayer) if (money > 150) then takePlayerMoney ( thePlayer, tonumber(150) ) setElementHealth ( thePlayer, getElementHealth(thePlayer) + 100 ) else outputChatBox("You need 150coins.", thePlayer) end sorry for my noobishness x.x
  22. You can't, his server gone. viewtopic.php?f=105&t=46148 it's not =)
  23. none worked .. I tried both .. fiendly.lua and in the meta I imported them as server
×
×
  • Create New...