Jump to content

Zuher Laith

Members
  • Posts

    148
  • Joined

  • Last visited

Everything posted by Zuher Laith

  1. Hi .. Thanks for Clearing up the Idea , got it .. but i have one question please , I can i make a list of "allowed_model" ? like multiple ID's ..
  2. Can you give an example please ? because i don't know how to gather things up at here .. also i am binding key at client side , and getElementModel works in server side .. This is confusing a little bit ..
  3. Hi .. I'am making a Little script and i need your help with that .. So my idea is when the player is in Police Vehicle (like specified vehicles list) Then The GUI are Able to be Visible ( On bindkey ) and if not the player was in the Specified Vehicle , Then The GUI Won't Show Up ( On bindkey ) I Know that i should Use " isPedInVehicle ", but i don't know how to do it in the right way. So Currently, I have the Bindkey functions & Works Fine: ------------------- --Key For Open Panel ------------------- local key = "O" --------------------- --Key to Open Panel --------------------- open = false bindKey ( key, "down", function ( ) if open == false then add() for k,v in ipairs(mywind) do guiSetVisible(v,true) guiSetAlpha(mywind[13],0.89999997615814) end showCursor(true) open = true else close() guiSetAlpha(mywind[13],0) end end ) --------------------- --Close Panel --------------------- function close() for k,v in ipairs(mywind) do guiSetVisible(v,false) end showCursor(false) open = false setCameraTarget ( getLocalPlayer() ) end what i want to do , is just make this work While Player In Specified Vehicle's Any Help please ?..
  4. Anyone saw this last message ? ..
  5. Hi Again .. I had the same problem , but with another mod So The Image Doesn't hide .. here is the code: local screenWidthh, screenHeightt = guiGetScreenSize() local windowWidthh, windowHeightt = 120, 201 local leftt = screenWidthh/3.5 - windowWidthh/3.5 local topp = screenHeightt/1 - windowHeightt/1 mywind[13] = guiCreateStaticImage(leftt,topp, windowWidthh,windowHeightt,"img/s1.png",false) guiSetAlpha(mywind[13],0.89999997615814) mywind[5] = guiCreateGridList(10, 10, 100, 113, false, mywind[13]) guiGridListSetSelectionMode(mywind[5],2) local column = guiGridListAddColumn(mywind[5], "Players", 0.60) row1 = guiGridListAddRow(mywind[5]) row2 = guiGridListAddRow(mywind[5]) row3 = guiGridListAddRow(mywind[5]) row4 = guiGridListAddRow(mywind[5]) row5 = guiGridListAddRow(mywind[5]) row6 = guiGridListAddRow(mywind[5]) guiGridListSetItemText(mywind[5],row1,column,"1 min", false, false) guiGridListSetItemColor ( mywind[5], row1, column, 0, 0, 255 ) guiGridListSetItemText(mywind[5],row2,column,"2 min", false, false) guiGridListSetItemColor ( mywind[5], row2, column, 0, 0, 255 ) guiGridListSetItemText(mywind[5],row3,column,"3 min", false, false) guiGridListSetItemColor ( mywind[5], row3, column, 0, 0, 255 ) guiGridListSetItemText(mywind[5],row4,column,"4 min", false, false) guiGridListSetItemColor ( mywind[5], row4, column, 0, 0, 255 ) guiGridListSetItemText(mywind[5],row5,column,"5 min", false, false) guiGridListSetItemColor ( mywind[5], row5, column, 0, 0, 255 ) guiGridListSetItemText(mywind[5],row6,column,"1 hour", false, false) guiGridListSetItemColor ( mywind[5], row6, column, 0, 0, 255 ) mywind[6] = guiCreateButton(10, 165, 100, 26, "Cancel", false, mywind[13]) mywind[8] = guiCreateButton(10, 130, 100, 26, "Throw", false, mywind[13]) for k,v in ipairs(mywind) do guiSetVisible(v,false) end So the Point is , i don't have a problem with binding The Only Problem is when i start the mod , the Background "mywind[13]" be visible , but the children of "mywind[13]" are hidden , and when i bindkey , The Children of "mywind[13]" Show's up normally! So , might be not the right line ? waiting for reply ..
  6. Freaking Hell it worked After 43 Posts @@" even the Pinned Topics didn't get more than 10 reply Thank you So much man ! you saved my life and thanks to @tosfera and @IIYAMA Also , I Think no body else keeped helping me to the end except you , You Deserve to be in Top . Problem Solved.
  7. @MrTasty I Understand Now .. Here is the Edit's i made in My Mod (server.lua): Still Doesn't Work my friend .. The Error Given: [21:27:40] WARNING: [gamemodes]\business\scripts\core.server.lua:83: Bad argument @ 'triggerClientEvent' [Expected element at argument 2, got string 'business.dxOutputMessage'] This is Really Annoying problem ..
  8. How do you know it works fine on client side? I mean, if you haven't inputted any arguments then nothing should be outputted, since you didn't input a message to display. Look .. I Used This Code On Client Side: call(getResourceFromName("business"), "outputMessage", source, "the message bla bla bla...", 0, 245, 33) and when i tested it , the message showed up ! & no Error Given ! But When i called it on Server Side With the Same code , didn't work & gave me an error: [15:26:24] WARNING: [gamemodes]\business\scripts\core.server.lua:83: Bad argument @ 'triggerClientEvent' [Expected element at argument 2, got string 'business.dxOutputMessage'] So let's guess .. Maybe i should not use "outputMessage" , because in "business Meta.xml" i added 2 Functions with the Same name , but only changed the Type ..: function="outputMessage" type="client"/> function="outputMessage" type="server"/> Maybe , this is not correct isn't it ?
  9. Still Unsolved Yet .. I Send a PM to the Mod Developer yesterday .. i'am waiting for his respond now in topic .. but Until then , does someone know how to deal with this ? .. Thanks ..
  10. look .. In My Mod - Server Side - I Didn't Used any arguments , i just used call ( Doesn't Work ) In My Mod - Client Side - I Didn't Used any arguments , i just used call ( Work's Fine ) In business - Server Side - he Used some functions .. I Wrote them in Page 2 Of topic (Full Code: core.server.lua) In business - Client Side - he Used Only one Function .. In "core.client.lua" .. here is the Code of It: function outputMessage(message, r, g, b) triggerServerEvent("business.outputMessage", localPlayer, message, r, g, b); end In business - Meta File - I Exported the Following Functions .. <export function="outputMessage" type="client"/> <export function="outputMessage" type="server"/> <export function="dxOutputMessage" type="server"/> <export function="Player:outputMessage" type="server"/> I guess that's Explains every thing right ? ..
  11. Can you give me the Edit's you made to make this corrected ? because i'am shore you read the error line ..
  12. @IIYAMA because Arabic Letters are from Right to Left , and your notepad is in Left to Right Mode I Checked That.
  13. This is the Part When i Call the outputMessage In Server Side (My Mod) So it might be not "outputMessage" , maybe it's "player:outputMessage" just like in the "business" mod server side
  14. Problem Solved. Thank's every one for help!
  15. I Used it , still giving me the same error: [15:26:24] WARNING: [gamemodes]\business\scripts\core.server.lua:83: Bad argument @ 'triggerClientEvent' [Expected element at argument 2, got string 'business.dxOutputMessage'] I Tried it on Server/Client Side, Same Error.
  16. Here is my Mod Server File (Full) .. No edit's: for notice .. Check Line 49,51.
  17. @tosfera Works Great ! I Wonder if i can Destroy Vehicle On the same last code .. can i do that?
  18. Greetings Everyone .. I Was looking for a way to moveObject Only If a Ped is in Vehicle and if the ped not in Vehicle , then do nothing. So here's my Code for Moving the Object: (Work's Fine) local Door4 = createObject(980,2087.5,1433.1999511719,12.300000190735,0,359.75,89.499969482422) local markerDoor4 = createMarker(2088.3000488281,1433.3000488281,9.8000001907349,'cylinder',8,0,0,0,0) addEventHandler('onMarkerHit',markerDoor4, function ( hitElement2 ) moveObject(Door4,1000,2087.5,1433.1999511719,7.1999998092651) end ) What i want is to "MoveObject" Only if the Player was in Vehicle .. I Saw this isPedInVehicle , and i tried this code: local Door4 = createObject(980,2087.5,1433.1999511719,12.300000190735,0,359.75,89.499969482422) local markerDoor4 = createMarker(2088.3000488281,1433.3000488281,9.8000001907349,'cylinder',8,0,0,0,0) function outputIsInVehicle ( sourcePlayer, commandName, checkedPlayerName ) -- we get the player element from the nick specified local checkedPlayer = getPlayerFromName ( checkedPlayerName ) -- if there exists a player with that nick if ( checkedPlayer ) then -- if he's in a vehicle, if isPedInVehicle ( checkedPlayer ) then -- tell the source player addEventHandler('onMarkerHit',markerDoor4, function ( hitElement2 ) moveObject(Door4,1000,2087.5,1433.1999511719,7.1999998092651) end ) outputChatBox ( checkedPlayerName .. " is in a vehicle.", sourcePlayer ) -- if he's not in a vehicle, else -- Nothing if the player not in vehicle. end -- if it doesn't exist, else -- tell the source player outputChatBox ( "Invalid player name.", sourcePlayer ) end end So i tried this, but didn't worked. P.S: i used this code only on server side. Waiting for Reply.
  19. I'am Testing it from a Normal Script, Server.lua The Script doesn't have any thing linked with "business" mod ! So it's a normal Call ! <meta> <info author="NiGht" version="4.0.0" type="script" /> <script src="Client.lua" type="client" /> <script src="Server.lua" type="server" /> </meta> If you are not understanding the problem yet, do you want to take a look in TeamViewer ?
  20. 1- The Error Is : [12:10:31] WARNING: [gamemodes]\business\scripts\core.server.lua:83: Bad argument @ 'triggerClientEvent' [Expected element at argument 2, got string 'business.dxOutputMessage'] 2- The Setting Set to "dx'.
  21. Server Side (Not Working): call(getResourceFromName("business"), "outputMessage", source, "Server Side Message Check", 255, 0, 255) Client Side (Work's Fine): call(getResourceFromName("business"), "outputMessage", "Client Side Message Check", 251, 100, 0)
  22. Never mind, i forgot to change "hitElement" to "localPlayer" but i have one question , i'am using an client side the teleport doesn't require a server side right?
  23. I want to make it On MarkerHit Does it Require a Server Side? Or only a Client Side? This is my Client Side: marker = createMarker(1368.4604492,-1279.7705078,12.6,"cylinder",1.5,246,255,0,255,getRootElement()) function teleport (hitElement) setElementInterior ( localPlayer, 1, 286.9273,-39.7898,1001.5156 ) end addEventHandler("onMarkerHit",marker,teleport) and if it's request a server side .. how may i do that?
  24. Still not working my friend .. It work's on client side, but don't work on server side you can see in "business" mod it's different output in server/client side This is really annoying .. Any help please ?
  25. Hi Everyone I Searched Wikipedia for spawnPlayer Function to Teleport Into Another Place .. Like "Ammu Nation 1" What i want is to select the Interior Without changing ped (if i typed 0, it Change's to Cj Ped) Here's my Code: spawnPlayer(hitElement,286.9273,-39.7898,1001.5156,0,0,1) This Move's the Player to Ammu Nation 1 Interior but It Change's the Ped every time, i don't want to change the ped How can i do that ?
×
×
  • Create New...