Jump to content

Cronoss

Members
  • Posts

    173
  • Joined

  • Last visited

  • Days Won

    1

Cronoss last won the day on May 11

Cronoss had the most liked content!

Recent Profile Visitors

569 profile views

Cronoss's Achievements

Mark

Mark (16/54)

28

Reputation

  1. Try this function playerChat(message, messageType) if messageType == 0 then --Global (main) chat local ID = getElementData(source, "ID") or "N/A" if isObjectInACLGroup("user."..getAccountName ( getPlayerAccount (source)), aclGetGroup ("Console") ) then outputChatBox("#DDA0DD* [#000000Fundador#DDA0DD] " ..getPlayerName(source).." ["..ID.."]: #FFFFFF"..message, root, 255, 0, 0, true ) outputServerLog("ChatLog: "..getPlayerName(source).." ["..ID.."]: "..message) elseif isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Adm" ) ) then outputChatBox("#DDA0DD* [#FF0000Administrador#DDA0DD] " ..getPlayerName(source).." ["..ID.."]: #FFFFFF"..message, root, 255, 0, 0, true ) outputServerLog("ChatLog: "..getPlayerName(source).." ["..ID.."]: "..message) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#DDA0DD* [#9370DBPlayer#DDA0DD] " ..getPlayerName(source).." ["..ID.."]: #FFFFFF"..message, root, 255, 0, 0, true ) outputServerLog("ChatLog: "..getPlayerName(source).." ["..ID.."]: "..message) end end cancelEvent() --Change the cancel event to this part end addEventHandler("onPlayerChat", root, playerChat)
  2. Maybe adding this parameter? I had the same problem when I was testing some scripts in my server, this was the problem for me --server function j1server2() local x,y,z = 0, 0, 0 triggerClientEvent(source, "j1client",source, x,y,z) --This end addEvent("j1server2",true) addEventHandler("j1server2",root,j1server2) Also, I don't get why you add events to these functions if you are not gonna call them before with another function like "triggerServerEvent" or something like that, this should work exactly like you want: --server function j1server() local car1 = createVehicle (408, 0, 0, 0, 0, 0, 0, "car1", 0, 0, 0) j1server2() end addEvent("j1server",true) --------------------It is necessary here addEventHandler("j1server",root,j1server) function j1server2() local x,y,z = 0, 0, 0 triggerClientEvent("j1client",source, x,y,z) end addEventHandler("j1server2",root,j1server2) Another solution for me should be: --Client --Your 1st function blabla... function j1client0() triggerServerEvent("j1server",getLocalPlayer(), getLocalPlayer()) --Add this destroyElement(w1) showCursor(false) end --Server function j1server(player) local car1 = createVehicle (408, 0, 0, 0, 0, 0, 0, "car1", 0, 0, 0) --You could add the whole function j1server2, idk why you separate these functions triggerClientEvent(player, "j1client", player, x,y,z) end addEvent("j1server", true) addEventHandler("j1server",root,j1server)
  3. Could you show how you are calling those events? (server-side part)
  4. You can use these functions; onClientRender, dxDrawText, givePlayerMoney. <-- For the "countdown" https://wiki.multitheftauto.com/wiki/OnClientRender https://wiki.multitheftauto.com/wiki/DxDrawText https://wiki.multitheftauto.com/wiki/GivePlayerMoney But reading your post I think you are requesting for the full script, basically you want someone make it for you, and this is not the section you should post this
  5. The event is triggered once, inside the function "callCharacterCreation". This is where it is called: addEvent("selectionSlot", true) addEventHandler("selectionSlot", getRootElement(), function(player, selected, characterName, characterName2, characterName3) if selected == 1 then if characterName ~= "" then --If the character's name it's not empty then... --Removes the unnecesary element data local slot = 1 --Unnecesary callCharacterCreation(player, slot) --Triggers the function else --Removes the unnecesary element data end end --This function continues like that till the third slot --I noticed that I might use "selected" instead of creating a new variable called slot but I don't think that's the problem --And yes, I'm removing element data in every conditional part in the function because of; it's information that it's only necesary for the selection panel, after that, I don't need it
  6. --Server Side-- function callCharacterCreation(player, slot) setElementPosition(player, 209.75735473633,-33.699203491211,1001.9296875) setElementRotation(player, -0, 0, 137.15386962891) triggerClientEvent(source, "createCharacter", source, slot) end This is what the server-side trigger looks like. ^ I changed all the "getRootElement" to "root" but the problem it's still happening. This is what the error msg says: Version = 1.5.9-release-21210.0.000 Time = -- Module = D:\Multi Theft Auto\mta\multiplayer_sa.dll Code = 0xC0000005 Offset = 0x000026CB
  7. When my MTA crashes, a new window shows up and give me information about the crash (some codes like 0x0c005, i don't remember at all). There is no other function inside "createCharacterPanel", just dxDraw. And this doesn't happen randomly when the player enter into the "character creation", it only happens when the player reconnect
  8. Well, I've been trying to solve this problem time ago but nothing seems to work. When I was testing my new "login-system" I started to reconnect while the script was running and it crashed in the "Character creation", it always happen at that part, it never crashes at the login, register, or selection part, just when the player creates a character. I still can't figure out what it's causing this crash, basically all that part it's on Client-Side with dxDraw as panels I'm not even geting element data or something like this, take a look at the code: addEvent("createCharacter", true) addEventHandler("createCharacter", getRootElement(), function() setCameraMatrix(206.72476196289,-36.323947906494,1001.8046875, 209.75735473633,-33.699203491211,1001.9296875) addEventHandler("onClientRender", getRootElement(), createCharacterPanel) createCharacterButtons() end ) --The rest it's the panel, I removed it, and the problem it's still happening so...
  9. I made the full script and it works, thank you IIYama!
  10. I want to improve my skin system but I don't know really how to make the system select the first or second group of skins (male, and female). My original idea was get the "character gender", and that's what I want to do but I don't get how to make it possible. Any help would be appreciated local skins = { [1] = {1, 2, 7, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 43, 44, 45, 46, 47, 48, 49, 51, 52, 57, 58, 59, 60, 62, 66, 67, 68, 70, 72, 73, 78, 79, 80, 81, 82, 83, 84, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, 132, 133, 134, 135, 136, 137, 142, 143, 144, 146, 147, 154, 155, 156, 158, 159, 160, 161, 163, 164, 165, 166, 167, 168, 170, 171, 173, 174, 175, 176, 177, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 200, 202, 203, 204, 206, 209, 210, 212, 213, 217, 220, 221,222, 223, 227, 228, 229, 230, 234, 235, 236, 239, 240, 241, 242, 247, 248, 249, 250, 252, 253, 254, 255, 258, 259, 261, 262, 264, 269, 270, 271, 272, 290, 291, 292, 293, 294, 295, 297, 299, 300, 301, 302, 303, 306, 307, 308, 310, 311, 312}, [2] = {9, 10, 11, 12, 13, 31, 38, 39, 40, 41, 53, 54, 55, 56, 63, 64, 69, 75, 76, 85, 87, 88, 89, 90, 91, 91, 93, 129, 130, 131, 138, 139, 140, 141, 145, 148, 150, 151, 152, 157, 169, 172, 178, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 201, 205, 207, 211, 214, 215, 216, 218, 219, 224, 225, 226, 231, 232, 233, 237, 238, 243, 244, 245, 246, 251, 256, 257, 263, 298, 304} }
  11. I'm searching for something that could allow the players to fly, not with a vehicle or something, I mean the player can enable it with a command and start flying. Is this possible with the MTA default commands? I tried with other commands but it only works if I'm in a vehicle
  12. I appreciate it, but this wouldn't cause lag problems if I ask for element data? something like this: function infoPanel() local name = getElementData(localPlayer, "character.2") --dx draw text blabla "your name: "..name.."" end addEventHandler("onClientRender", getRootElement(), infoPanel)
  13. I need help with something. I can't find anything about this on the forum, so I'll try to explain it; I want the player to be able to see their information in a panel (created with guieditor / dxDraw) Example: Your money: $40.000 Your Health: 100/100 I know this is possible but I don't know wich option I should choose for these "changing texts" : 1.- Using a "DX text" empty and then using some scripting, the player could get his info (?) 2.- Same here but with "label" (guieditor tool) (?) I'm not posting any code because I'm trying to figure out how to finish it, I just need to know between those options wich is the better way to make this possible
  14. I want to make a system like this but I don't know how to make it createPickup(blabla) -- This marks where the entry is createPickup(blabla) addEventHandler("onPlayerPickupHit", getRootElement(), function() cancelEvent() --prevents the pickups disappear end) -------------------This is the important part local pickups = { {"interior shop", 123,123,123,567,567,567}, {"interior hospital", 123,123,123,567,567}, } createMarker(blablabla) -- invisible marker in the same position of the pickups createMarker(blablabla) function teleportToInterior() local x,y,z = getElementPosition(source) -- i dont know how to make the system associates the player's position with the table data, if the position it's the same from the 3 first coordinates, then it will save that info and... teleportFunction(dataX, dataY,dataZ) --when the function recognizes where the player is, a function that teleport the player to the next coords is called
  15. If the player presses "shift" he can stop the animation and start moving, I want to freeze the player with that animation
×
×
  • Create New...