Jump to content

WhoAmI

Members
  • Posts

    1,248
  • Joined

  • Last visited

Everything posted by WhoAmI

  1. Maybe use setElementPosition instead of interior.
  2. I'm not sure, but this "[]" isn't needed at all. clanPlayers = { "3R//", "Name2", "Name3" } local colorCodeRed = {255,0,0} local colorCodeGreen = {0,255,0} local colorCodeBlue = {0,0,255} setTimer(function() if isInClan(source) == true then setPlayerName(source,"3R//"..getPlayerName(source)) end end,1000,0) function isInClan(player) local name = getPlayerName(player) for i,v in ipairs (clanPlayers) do if name == clanPlayers[1] then return true else return false end end end
  3. He wants do to resource by his own i guess. You can do it by XML or table. Table is easier way. vehicles = { {"Vehicle name", "price"}, {"Bullet", "300000"} } function showAvailibleCars (player) for k,v in ipairs(vehicles) do outputChatBox("Name: "..v[1]..", Price: "..v[2].."$", player) end end addCommandHandler("show_vehicles", showAvailibleCars) By using /show_vehicles you can see all vehicle which you put in table. Now you can do similar think using UI.
  4. WhoAmI

    Mute Problem

    function mutePlayer(player,command,victimName) if victimName then local victim = getPlayerFromName(victimName) if victim then if ( not isPlayerMuted(victim) ) then setPlayerMuted(victim, true) outputChatBox("You have been muted.",victim) setElementData(victim, "muted", true) end else outputChatBox("Could not find player with name: "..tostring(victimName),player) end else outputChatBox("Usage: /mute ",player) end end addCommandHandler("mute",mutePlayer) Client function DXtext () local muted = getElementData(localPlayer, "muted") or false local value if (muted) then value = "Yes" else value = "No" end local sWidth,sHeight = guiGetScreenSize() dxDrawText("Mute: "..value,sWidth*0.900, sHeight*0.452, sWidth*0.715, sHeight*0.997,tocolor(255,255,255,175),0.8,"bankgothic","left","top",false,false,false) end addEventHandler ( "onClientRender", getRootElement(), DXtext )
  5. setElementData(localPlayer, "drugs", getElementData(localPlayer, "drugs") + 1)
  6. WhoAmI

    Sirens

    Can you show me an example? I just want code when the sirens would be on and off, rest i'd do.
  7. WhoAmI

    Sirens

    Hi guys! I have one question. Is it possible to do new sound of cop's car and ambulance's sirens? I was looking for event, which start when someone turns on sirens, but there is no event like that, so... Is there antoher way? Someone has an idea?
  8. Just do one if if (minutes < 10) then minutes = "0"..minutes end Sam with hours.
×
×
  • Create New...