Jump to content

Samking

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by Samking

  1. Thanks, and in line 3 you should add local r, g, b = 0,0,0 else it will generate marker colors other than green,blue and red when using loop
  2. Hey all How i can change marker colors randomly between yellow,green and red ---0,255,0 green ---255,255,0 yellow --255,0,0 red
  3. sorry bro it only gives output "unknown error" but did not change the alpha to 255.
  4. Thanks, I make the code with the help of you. but there is one problem it didn't give an output when alpha is set to 255 on vehicle exit. function apoff( thePlayer ) if getElementAlpha( thePlayer ) == 0 then setElementAlpha ( thePlayer, 255 ) outputChatBox ( "Alpha Auto set to 255",thePlayer, 0, 255, 0, true ) else outputChatBox ( "Unknoown Error",thePlayer, 255, 0, 0, true ) end end addEventHandler("onClientPlayerVehicleExit", getRootElement(),apoff)
  5. try this https://community.multitheftauto.com/?p=resources&s=details&id=16053
  6. function alpha( thePlayer ) if isPedInVehicle(source) == false then outputChatBox("You do not have a Vehicle", thePlayer,255, 0, 0, true ) end if (isPedInVehicle (source)) then setElementAlpha ( getPedOccupiedVehicle(source),0) end end addEvent("alp",true) addEventHandler("alp",getRootElement(),alpha) How I can set alpha to 255 when the player exit the vehicle?
  7. local screenWidth,screenHeight = guiGetScreenSize() function renderDisplay ( ) local streamedPlayers = getElementsByType ("player", root, true) if streamedPlayers and #streamedPlayers ~= 0 then local lpos = {getElementPosition(localPlayer)} for _,p in ipairs (streamedPlayers) do if p and isElement (p) then if getElementData (p, "invincible") then local ppos = {getElementPosition(p)} dxDrawImage(520, 250, 50, 50, 'logo.png', getTickCount() / 36 % 360) end end end end end function HandleTheRendering ( ) addEventHandler("onClientRender", root, renderDisplay) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) How I can draw a logo with player nametag when you enable safe mode it will be visible to all the player. Nametag : https://community.multitheftauto.com/index.php?p=resources&s=details&id=13923 Sorry for my English...
  8. Samking

    Bass error

    sorry the problem was I put the / in the wrong direction sound=playSound("music/gang.mp3") close the topis idk how to remove.
  9. Samking

    Bass error

    function snd() if isElement(sound) then stopSound(sound) end sound=playSound("music\gang.mp3") end addEvent("sound", true) addEventHandler("sound", root, snd) BASS ERROR 2 in LoadMedia path:E:\Mta sa\mods\deathmatch\resources\vips\musicgang.mp3 3d:0 loop:0 how I can solve this problem?
  10. Samking

    Acl vehicle

    function enterVehicle (player, seat) if getElementModel(source) == 592 and seat == 0 then local accName = getAccountName(getPlayerAccount (player)) if not isPlayerInGroup (player, "pilot") then cancelEvent() outputChatBox ( "Only Pilots can enter in this vehicle", player,255,0, 0,true) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) Error : pilot\vehicle.lua:6: attempt to call global 'isPlayerInGroup' (a nil value) Please help me to solve this problem.
  11. Samking

    [Help] Stats

    GUIEditor.label[1] = guiCreateLabel(33, 40, 145, 15, "Name : "..getPlayerName(localPlayer), false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 12, 240, 60) GUIEditor.label[2] = guiCreateLabel(33, 69, 145, 15, "Money : "..getPlayerMoney (localplayer) , false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 12, 240, 60) GUIEditor.label[3] = guiCreateLabel(33, 98, 145, 15, "Health : "..getElementHealth (localPlayer), false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 12, 240, 60) GUIEditor.label[4] = guiCreateLabel(33, 123, 145, 15, "Ping :"..getPlayerPing (localPlayer), false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 12, 240, 60) When I increase my money from 0 to 100 the money was still 0 in stats and also Health, ping. When I upgrade the Script then Stats change by itself How I can do like Change stats Automatically without upgrading
  12. GUIEditor.button[15] = guiCreateButton(203, 273, 128, 59, "Fly car", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[15], "default-bold-small") guiSetProperty(GUIEditor.button[15], "NormalTextColour", "FF0C6DF2")
  13. It's not Working Plz can u make one for me?
  14. function fly() if isPedInVehicle(localPlayer) == false then outputChatBox("You can only use FLY car mode when in Vehicle", 255, 0, 0, true) end if isPedInVehicle(localPlayer) == true then if source == GUIEditor.button[15] then setWorldSpecialPropertyEnabled("aircars", true) outputChatBox("Fly Mode is Disabled ", 255,215,0, true) end end end addEventHandler("onClientGUIClick", GUIEditor.button[15], fly, false) Bad Argument @AddEventHsndler Except Element Argument 2 got nil plz fix
  15. warning BadArgument @getPlayerAccount [Excepted] Element at argument 1 got nill warning BadArgument @getAccountName [Excepted account at argument 1 got boolean]
  16. Now this only give output Wrong Account And it's not working
  17. function givevip (playerSource, commandName, accountName) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if accountName then aclGroupAddObject (aclGetGroup("VIP"), "user."..accountName) outputChatBox ("Account '"..accountName.."' add to VIPs successfully!", playerSource) else outputChatBox ("Wrong Account ", playerSource) end end end addCommandHandler ("addvip", givevip) function remvip (playerSource, commandName, accountName) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if accountName then aclGroupRemoveObject (aclGetGroup("VIP"), "user."..accountName) outputChatBox ("Account '"..accountName.."' Remove from VIPs", playerSource) else outputChatBox ("Wrong Account ", playerSource) end end end addCommandHandler ("delvip", remvip) The problem is When I type /addvip accname This only give output Account samking add to VIPs Successfully but not add to VIP acl group Please help
  18. x, y, size = -2095.97632, -280.48669, 120 local greenzone = createColRectangle ( -2095.97632, -280.48669,85, 200) local greenzonemaparea = createRadarArea (-2095.97632, -280.48669,85, 200, 255,215,0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Entered The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) end addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Left The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit ) How I can make this Area That Only ACL group "VIP" can enter?
  19. I am newbie please can you make on as an example
×
×
  • Create New...