Jump to content

Blaawee

Members
  • Posts

    857
  • Joined

  • Last visited

Everything posted by Blaawee

  1. Blaawee

    need help

    server side: triggerClientEvent("ip",getLocalPlayer()) ip1 = guiCreateLabel(0.02,0.62,0.94,0.92,"your ip : "..ip,true,tab1) like this?
  2. Blaawee

    need help

    like this : ?? triggerServerEvent("ip",getLocalPlayer()) ip1 = guiCreateLabel(0.02,0.62,0.94,0.92,"your ip : "..ip,true,tab1)
  3. Blaawee

    need help

    can you make example becuse i didn''t get it :@
  4. Blaawee

    need help

    what about get player ip and player account ?? ip1 = guiCreateLabel(0.02,0.62,0.94,0.92,"your ip : "..tostring(getPlayerIP(localPlayer)),true,tab1) guiLabelSetColor (ip1,255,255,0,220) guiSetFont(ip1,"default-bold-small") ping1 = guiCreateLabel(0.02,0.55,0.94,0.92,"your ping : "..tostring(getPlayerPing(localPlayer)),true,tab1) guiLabelSetColor (ping1,255,255,0,220) guiSetFont(ping1,"default-bold-small") theSerial = getPlayerSerial( thePlayer ) serial1 = guiCreateLabel(0.02,0.68,0.94,0.92,"your serial : "..tostring(getPlayerSerial()),true,tab1) guiLabelSetColor (serial1,255,255,0,220) guiSetFont(serial1,"default-bold-small") name1 = guiCreateLabel(0.02,0.82,0.94,0.92," username : "..tostring(getPlayerAccount()),true,tab1) guiLabelSetColor (name1,0,255,0,220) guiSetFont(name1,"default-bold-small") theTeam = getPlayerTeam( localPlayer ) if theTeam then teamName = getTeamName(theTeam) else teamName = "N/A" end yourteam = guiCreateLabel(0.02,0.88,0.94,0.92,"yourTeam :"..tostring(teamName),true,tab1) guiLabelSetColor (yourteam,0,255,0,220) guiSetFont(yourteam,"default-bold-small") is this right ?
  5. I just want to do a proposal , mybe we get this gamemode working
  6. Blaawee

    need help

    i'v been edit this code and it's not work ip1 = guiCreateLabel(0.02,0.62,0.94,0.92,"your ip : ",true,tab1) guiLabelSetColor (ip1,255,255,0,220) guiSetFont(ip1,"default-bold-small") ping1 = guiCreateLabel(0.02,0.55,0.94,0.92,"your ping : ",true,tab1) guiLabelSetColor (ping1,255,255,0,220) guiSetFont(ping1,"default-bold-small") theSerial = getPlayerSerial( thePlayer ) serial1 = guiCreateLabel(0.02,0.68,0.94,0.92,"your serial : "..theSerial,true,tab1) guiLabelSetColor (serial1,255,255,0,220) guiSetFont(serial1,"default-bold-small") name1 = guiCreateLabel(0.02,0.82,0.94,0.92," username : ",true,tab1) guiLabelSetColor (name1,0,255,0,220) guiSetFont(name1,"default-bold-small") --Team theTeam = getPlayerTeam( source ) if theTeam then teamName = getTeamName(theTeam) else teamName = "N/A" end yourteam = guiCreateLabel(0.02,0.88,0.94,0.92,"yourTeam :"..tostring(teamName),true,tab1) guiLabelSetColor (yourteam,0,255,0,220) guiSetFont(yourteam,"default-bold-small")
  7. What about to make two team in each team theres leader, builder and guards and warior
  8. where did you put the dxscoreboard ?? search mybe there is onther scoreboard
  9. you mean to enter Building ??? there is resource called interor , I think ^^ search in resorce menu for 'int' and start it
  10. make some change : function limoCommand ( thePlayer, commandName) destroyElement (limoOphaalBlip) limoOphaalBlip = createBlipAttachedTo (thePlayer, 49, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) else outputChatBox ("bus on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) else outputChatBox ("Someone rang the bus!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("limo", limoCommand) is this syntex is right ?
  11. setTeamFriendlyFire (teammechanic, false) setTeamFriendlyFire (teamtaxi, false) setTeamFriendlyFire (teamlimo, false) setTeamFriendlyFire (teammedic, false) setTeamFriendlyFire (teamtrucker, false) setTeamFriendlyFire (teampolice, false) setTeamFriendlyFire (teammaffia, false) setTeamFriendlyFire (teamhippie, false) setTeamFriendlyFire (teammedic, false) --Limocommand: limoCommand function (thePlayer, command) destroyElement (limoOphaalBlip) limoOphaalBlip = createBlipAttachedTo (thePlayer, 49, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) outputChatBox ("bus on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) outputChatBox ("Someone rang the bus!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("limo", limoCommand) limoCancelCommand function (thePlayer, command) outputChatBox ("Invoked bus." thePlayer, 255, 190, 0, false) outputChatBox ("Someone canceled the bus!" getRootElement (), 255, 190, 0, false) destroyElement (limoOphaalBlip) end addCommandHandler ("nolimo" limoCancelCommand) betaaldelimoChaufeur function (thePlayer, seat, jacked) theVehicleID = getElementModel (source) if (theVehicleID == 409) and (seat ~ = 0) then theDriver = getVehicleOccupant (source, 0) givePlayerMoney (theDriver, 25) takePlayerMoney (thePlayer, 25) outputChatBox ("you paid $ 25 to ride," thePlayer) destroyElement (limoOphaalBlip) end end addEventHandler ("onVehicleEnter" getRootElement (), betaaldelimoChaufeur) --Medic command: medicCommand function (thePlayer, command) destroyElement (medicOphaalBlip) limoOphaalBlip = createBlipAttachedTo (thePlayer, 49, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) outputChatBox ("Ambulance on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) outputChatBox ("Someone rang the ambulance!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("medic", medicCommand) medicCancelCommand function (thePlayer, command) outputChatBox ("Emergency revoked." thePlayer, 255, 190, 0, false) outputChatBox ("Someone canceled the ambulance!" getRootElement (), 255, 190, 0, false) destroyElement (medicOphaalBlip) end addCommandHandler ("nomedic" medicCancelCommand) betaaldemedicChaufeur function (thePlayer, seat, jacked) theVehicleID = getElementModel (source) if (theVehicleID == 409) and (seat ~ = 0) then theDriver = getVehicleOccupant (source, 0) givePlayerMoney (theDriver, 100) takePlayerMoney (thePlayer, 100) outputChatBox ("you paid 100", thePlayer) destroyElement (medicOphaalBlip) end end addEventHandler ("onVehicleEnter" getRootElement (), betaaldemedicChaufeur) --Taxi command: taxiCommand function (thePlayer, command) destroyElement (taxiOphaalBlip) taxiOphaalBlip = createBlipAttachedTo (thePlayer, 48, 1, 255, 0, 0, 0, 0, 99999.0, getRootElement ()) outputChatBox ("taxi on the way, will remain on the spot!" thePlayer, 255, 190, 0, false) outputChatBox ("Someone rang the taxi!" getRootElement (), 255, 190, 0, false) end addCommandHandler ("taxi", taxiCommand) taxiCancelCommand function (thePlayer, command) outputChatBox ("Taxi revoked." thePlayer, 255, 190, 0, false) outputChatBox ("Someone canceled the taxi!" getRootElement (), 255, 190, 0, false) destroyElement (taxiOphaalBlip) end addCommandHandler ("notaxi" taxiCancelCommand) betaaldeChaufeur function (thePlayer, seat, jacked) theVehicleID = getElementModel (source) if (theVehicleID == 420) and (seat ~ = 0) then driver = getVehicleOccupant (source, 0) givePlayerMoney (Driver, 50) takePlayerMoney (thePlayer, 50) outputChatBox ("you paid $ 50 per ride," thePlayer) destroyElement (taxiOphaalBlip) end end addEventHandler ("onVehicleEnter" getRootElement (), betaaldeChaufeur) --Mechanic: fixCar function (player, command) skin = getPedSkin (player) if (skin == 50) then local vehicle = getPedOccupiedVehicle (player) if (vehicle) then fixVehicle (vehicle) takePlayerMoney (player, 250) end end end addCommandHandler ("fix", fixCar) --Medic Heals healFlowers function (attacker, attackerweapon, bodypart, loss) theHealth = getElementHealth (source) if (attackerweapon == 14) and (loss> 1) and (theHealth <80) then setElementHealth (source, 100) takePlayerMoney (source, 100) givePlayerMoney (attacker, 1000) end end addEventHandler ("onPlayerDamage" getRootElement (), healFlowers) --Police arrest: PoliceCuff function (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 3) and (loss> 2) then setElementPosition (source, -1616.17, 683.47, 7.18, true) takePlayerMoney (source 50) givePlayerMoney (attacker, 100) end end addEventHandler ("onPlayerDamage" getRootElement (), PoliceCuff) --Kill Reward: killReward function (totalAmmo, killer, killerweapon, bodypart, stealth) local playerTeam = getPlayerTeam (killer) if (playerTeam == teamaztecs) then if (killer) and (killer ~ = source) then givePlayerMoney (killer, 100) end end end addEventHandler ("onPlayerWasted" getRootElement (), killReward) --Vagos kill Reward killReward function (totalAmmo, killer, killerweapon, bodypart, stealth) local playerTeam = getPlayerTeam (killer) if (playerTeam == teamvagos) then if (killer) and (killer ~ = source) then givePlayerMoney (killer, 100) end end end addEventHandler ("onPlayerWasted" getRootElement (), killReward) --Maffia kill Reward: killReward function (totalAmmo, killer, killerweapon, bodypart, stealth) local playerTeam = getPlayerTeam (killer) if (playerTeam == teammaffia) then if (killer) and (killer ~ = source) then givePlayerMoney (killer, 100) end end end addEventHandler ("onPlayerWasted" getRootElement (), killReward) --Police Vehicles and Skins: policeVehicles = {[598] = true, [596] = true, [597] = true, [599] = true, [528] = true, [523] = true, [497] = true} policeSkins = {[280] = true, [288] = true, [284] = true} policeenterVehicle function (player, seat, jacked) if (policeVehicles [getElementModel (source)]) and (not policeSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not cop, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), policeenterVehicle) --Mechanic Vehicles and Skins: mechanicVehicles = {[525] = true} mechanicSkins = {[50] = true} mechanicenterVehicle function (player, seat, jacked) if (mechanicVehicles [getElementModel (source)]) and (not mechanicSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not a mechanic, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), mechanicenterVehicle) --Swat Vehicles and Skins: swatVehicles = {[433] = true, [490] = true, [427] = true, [601] = true, [525] = true} swatSkins = {[285] = true} swatenterVehicle function (player, seat, jacked) if (swatVehicles [getElementModel (source)]) and (not swatSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not SWAT, you can not lead this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), mechanicenterVehicle) --Taxi Vehicles and Skins: taxiVehicles = {[420] = true} taxiSkins = {[7] = true} taxienterVehicle function (player, seat, jacked) if (taxiVehicles [getElementModel (source)]) and (not taxiSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not a taxi driver, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), taxienterVehicle) --Alleen voor hippie autos autoverkoperVehicles = {[483] = true} autoverkoperSkins = {[100] = true} autoverkoperenterVehicle function (player, seat, jacked) if (autoverkoperVehicles [getElementModel (source)]) and (not autoverkoperSkins [getElementModel (player)]) and (seat == 0) then removePedFromVehicle (player) outputChatBox ("You're not the guard, you can not enter this vehicle." player) end end addEventHandler ("onVehicleEnter" getRootElement (), autoverkoperenterVehicle) --Medic Vehicles and Skins: medicVehicles = {[416] = true} medicSkins = {[275] = true} medicenterVehicle function (player, seat, jacked) if (medicVehicles [
  12. Delete the old one and replace it with the dxscoreboard
  13. ops i didn't see the description , thx Capy :*
  14. I have onther resource but it's not work called : ( chatbubbles ) here is the code : --Client Side local textsToDraw = {} local hideown local showtime local characteraddition local maxbubbles local showthebubbles = true function income(message,messagetype) if source ~= getLocalPlayer() or not hideown then if messagetype == 2 then if getPlayerTeam(source) == getPlayerTeam(getLocalPlayer()) then addText(source,message,messagetype) end else addText(source,message,messagetype) end end end function addText(source,message,messagetype) local notfirst = false for i,v in ipairs(textsToDraw) do if v[1] == source then v[4] = v[4] + 1 notfirst = true end end local infotable = {source,message,messagetype,0} table.insert(textsToDraw,infotable) if not notfirst then setTimer(removeText,showtime + (#message * characteraddition),1,infotable) end end function removeText(infotable) for i,v in ipairs(textsToDraw) do if v[1] == infotable[1] and v[2] == infotable[2] then for i2,v2 in ipairs(textsToDraw) do if v2[1] == v[1] and v[4] - v2[4] == 1 then setTimer(removeText,showtime + (#v2[2] * characteraddition),1,v2) end end table.remove(textsToDraw,i) break end end end function getTextsToRemove() for i,v in ipairs(textsToDraw) do if v[1] == source then removeText(v) end end end function handleDisplay() if showthebubbles then for i,v in ipairs(textsToDraw) do if isElement(v[1]) then if getElementHealth(v[1]) > 0 then local camPosXl, camPosYl, camPosZl = getPedBonePosition (v[1], 6) local camPosXr, camPosYr, camPosZr = getPedBonePosition (v[1], 7) local x,y,z = (camPosXl + camPosXr) / 2, (camPosYl + camPosYr) / 2, (camPosZl + camPosZr) / 2 --local posx,posy = getScreenFromWorldPosition(x,y,z+0.25) local cx,cy,cz = getCameraMatrix() local px,py,pz = getElementPosition(v[1]) local distance = getDistanceBetweenPoints3D(cx,cy,cz,px,py,pz) local posx,posy = getScreenFromWorldPosition(x,y,z+0.020*distance+0.10) if posx and distance <= 45 and ( isLineOfSightClear(cx,cy,cz,px,py,pz,true,true,false,true,false,true,true,getPedOccupiedVehicle(getLocalPlayer())) or isLineOfSightClear(cx,cy,cz,px,py,pz,true,true,false,true,false,true,true,getPedOccupiedVehicle(v[1])) ) and ( not maxbubbles or v[4] < maxbubbles ) then -- change this when multiple ignored elements can be specified local width = dxGetTextWidth(v[2],1,"default") dxDrawRectangle(posx - (3 + (0.5 * width)),posy - (2 + (v[4] * 20)),width + 5,19,tocolor(0,0,0,255)) dxDrawRectangle(posx - (6 + (0.5 * width)),posy - (2 + (v[4] * 20)),width + 11,19,tocolor(0,0,0,40)) dxDrawRectangle(posx - (8 + (0.5 * width)),posy - (1 + (v[4] * 20)),width + 15,17,tocolor(0,0,0,255)) dxDrawRectangle(posx - (10 + (0.5 * width)),posy - (1 + (v[4] * 20)),width + 19,17,tocolor(0,0,0,40)) dxDrawRectangle(posx - (10 + (0.5 * width)),posy - (v[4] * 20) + 1,width + 19,13,tocolor(0,0,0,255)) dxDrawRectangle(posx - (12 + (0.5 * width)),posy - (v[4] * 20) + 1,width + 23,13,tocolor(0,0,0,40)) dxDrawRectangle(posx - (12 + (0.5 * width)),posy - (v[4] * 20) + 4,width + 23,7,tocolor(0,0,0,255)) local r,g,b = 255,255,255 if v[3] == 2 then r,g,b = getTeamColor(getPlayerTeam(v[1])) end dxDrawText(v[2],posx - (0.5 * width),posy - (v[4] * 20),posx - (0.5 * width),posy - (v[4] * 20),tocolor(r,g,b,255),1,"default","left","top",false,false,false) end end end end end end function getServerSettings() triggerServerEvent("onAskForBubbleSettings",getLocalPlayer()) end function saveSettings(settings) showtime = settings[1] characteraddition = settings[2] maxbubbles = settings[3] hideown = settings[4] addEvent("onMessageIncome",true) addEventHandler("onMessageIncome",getRootElement(),income) end function toggleBubblesOnOff() showthebubbles = not showthebubbles outputChatBox("Toggled chatbubbles " ..( not showthebubbles and "#FF0000off#FFFFFF." or "#00FF00on#FFFFFF." ),255,255,255,true) end addEventHandler("onClientPlayerQuit",getRootElement(),getTextsToRemove) addEventHandler("onClientRender",getRootElement(),handleDisplay) addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),getServerSettings) addEvent("onBubbleSettingsReturn",true) addEventHandler("onBubbleSettingsReturn",getRootElement(),saveSettings) addCommandHandler("chatbubbles",toggleBubblesOnOff) --Server Side local showtime = tonumber(get("chatbubbles.DefaultTime")) local characteraddition = tonumber(get("chatbubbles.PerCharacterAddition")) local maxbubbles = get("chatbubbles.MaxBubbles") if maxbubbles == "false" then maxbubbles = false else maxbubbles = tonumber(maxbubbles) end local hideown = get("chatbubbles.HideOwn") if hideown == "true" then hideown = true else hideown = false end function sendMessageToClient(message,messagetype) if messagetype == 0 or messagetype == 2 then triggerClientEvent("onMessageIncome",source,message,messagetype) end end function returnSettings() local settings = { showtime, characteraddition, maxbubbles, hideown } triggerClientEvent(source,"onBubbleSettingsReturn",getRootElement(),settings) end addEventHandler("onPlayerChat",getRootElement(),sendMessageToClient) addEvent("onAskForBubbleSettings",true) addEventHandler("onAskForBubbleSettings",getRootElement(),returnSettings) no error show in debugscript plz Help
  15. Thx CapY That's Work Now
  16. local newZ = getElementData ( attacker, "Zombie kills" ) outputChatBox( "Total Zombies killed: " .. (string).. " newZ) Maybe This
  17. chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"u","down","chatbox","LocalChat") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"u","down","chatbox","LocalChat") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("(LocalChat)"..nick..": #ffffff"..msg,v,r,g,b,true) end end end addCommandHandler("LocalChat",onChat) got this : line 24 '@ GetteamColor
  18. when i press the button U , i can't write in the chat
  19. send a msg to the nearby player :@
×
×
  • Create New...