Jump to content

MGO

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

297 profile views

MGO's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Hello, I'm new to mta scripting and I researched this issue but couldn't find any tutos, I would like to add a border to the following text : dxDrawText(v.text, sx - (0.5 * width), yPos, sx - (0.5 * width), yPos - (i * fontHeight), tocolor(unpack(v.color)), 1, font, "left", "top", false, false, false) the text moves with the player idk if that's worth mentioning, but I tried to add a border like this : dxDrawText(v.text, sx - (0.5 * width), yPos, sx - (0.505 * width), yPos - (i * fontHeight), tocolor(0,0,0), 1, font, "left", "top", false, false, false) dxDrawText(v.text, sx - (0.5 * width), yPos, sx - (0.495 * width), yPos - (i * fontHeight), tocolor(0,0,0), 1, font, "left", "top", false, false, false) dxDrawText(v.text, sx - (0.505 * width), yPos, sx - (0.5 * width), yPos - (i * fontHeight), tocolor(0,0,0), 1, font, "left", "top", false, false, false) dxDrawText(v.text, sx - (0.495 * width), yPos, sx - (0.5 * width), yPos - (i * fontHeight), tocolor(0,0,0), 1, font, "left", "top", false, false, false) dxDrawText(v.text, sx - (0.5 * width), yPos, sx - (0.5 * width), yPos - (i * fontHeight), tocolor(unpack(v.color)), 1, font, "left", "top", false, false, false) but the borders looks weird and glitchy, if anyone knows any solution plz help. and Thanks in advance.
  2. I couldn't figure out how to delete a post, I'm sorry
  3. Hi guys, I'm having trouble with the following code for my RP server the purpose of this is to take badge item from player and give key item instead but only in the area that I specified which is the flying zone, the whole script works fine except this part, I want it to exchange the badge for the key but if the player doesn't have the badge it will send a message saying you don't have any badges and if the exchange is made it will say you gave the badge so here's the code that I'm having trouble with : Client : bindKey( "E", "down", function() if getElementData(localPlayer, "Jobs") == "Dealer" then local detection = isElementWithinColShape ( localPlayer, Col ) if not( detection ) then return outputChatBox("#ffffff[ #FC861DFly-System#ffffff ] : You must be inside the flying zone.",255,255,255,true) end local nobadge = triggerServerEvent("NoBadge", localPlayer ) if not( nobadge ) then setPedAnimation(localPlayer, "BOMBER", "BOM_Plant", -1, false, false, false, false) triggerServerEvent("TakeBadgefromPlayer", localPlayer ) setTimer (function() local x, y, z = getElementPosition(localPlayer) local Object = createObject ( 677, x,y,z-1 ) outputChatBox("#ffffff[ #FC861DFly System#ffffff ] : You gave the badge.",255,255,255,true) setTimer(function(Object) if ( isElement(Object) ) then destroyElement(Object) triggerServerEvent("GivekeytoPlayer", localPlayer ) end end, 6000, 1,Object) end, 2000, 1) end end end ) Server : addEvent("TakeBadgefromPlayer", true) -- Give Badge. addEventHandler("TakeBadgefromPlayer", root, function() if exports.global:hasItem(client, 285) then exports.global:takeItem(client, 285) else outputChatBox("#ffffff[ #FC861DFly-System#ffffff ] : You don't have enough badges.",source,255, 255, 255,true) end end ) addEvent("GiveKeytoPlayer", true) -- Receive Key. addEventHandler("GiveKeytoPlayer", root, function() exports.global:giveItem(client, 33, 10) outputChatBox("#ffffff[ #FC861DFly-System#ffffff ] : You got 10 keys",source,255,255,255,true) end ) addEvent("Nobadge", true) -- Don't have Badge. addEventHandler("Nobadge", root, function() if not (exports.global:hasItem(client, 285))then outputChatBox("#ffffff[ #FC861DFly-System#ffffff ] : You don't have any badges.",source,255,255,255,true) end end )
  4. So I'm making this resource for an RP server that will take an item from the player's inventory and give him another item instead. so I used this addEvent("GivetoPlayer", true) addEventHandler("GivetoPlayer", root, function() exports.global:giveItem(client, 33, 10) outputChatBox("#ffffff[ #FC861DDrug-System#ffffff ] : You harvested 10 grams of Unprocessed PCP.",source,255,255,255,true) end ) exports.global:giveItem(client, 33, 10) So I'm making this resource for an RP server that will take an item from the player's inventory and give him another item instead. so I used this addEvent("GivetoPlayer", true) addEventHandler("GivetoPlayer", root, function() exports.global:giveItem(client, 33, 10) exports.global:giveItem(client, 33, 10) outputChatBox("#ffffff[ #FC861DDrug-System#ffffff ] : You harvested 10 grams of Unprocessed PCP.",source,255,255,255,true) end ) so the script does indeed give the item 2 to the player but idk why it won't remove the item 1 from the player's inventory So I'm making this resource for an RP server that will take an item from the player's inventory and give him another item instead. so I used this addEvent("GivetoPlayer", true) addEventHandler("GivetoPlayer", root, function() exports.global:takeItem(client, 33, 1) exports.global:giveItem(client, 33, 10) outputChatBox("#ffffff[ #FC861DDrug-System#ffffff ] : You got 10.",source,255,255,255,true) end ) so the script does indeed give the item 2 to the player but idk why it won't remove the item 1 from the player's inventory
×
×
  • Create New...