Jump to content

PaiN^

Members
  • Posts

    2,258
  • Joined

  • Last visited

Everything posted by PaiN^

  1. Make sure it's added to the admin group at the acl.xml file ..
  2. Make it a string : ( 'allowedGroup' )
  3. guiLabelSetColor guiSetFont
  4. Attacker is the first argument !, Remove the ( _ ) in the function ..
  5. addEventHandler( 'onPlayerLogin', root, function( _, acc ) if isObjectInACLGroup( 'user.'..getAccountName ( acc ), aclGetGroup( "Admin" ) ) then triggerClientEvent(source, "GUI", source) else outputChatBox("You are not an admin", source) end end ) NOTE : this will make the GUI appear to an Admin when he loges in !, Better use Mr.Pres[T]ege code ..
  6. gRoot = getRootElement() gMe = getLocalPlayer() sW , sH = guiGetScreenSize () TextScale = sH/1800 if TextScale < 0.5 then TextScale = 0.5 end TextFont = "bankgothic" RankingBoard = { anim = 360, state = true, animState = "closed", tick = getTickCount() } function drawRankingBoardIntreface() if RankingBoard.animState == "closed" then local tick = getTickCount() - RankingBoard.tick local progress = tick/1000 RankingBoard.anim = interpolateBetween(0,0,0,390,0,0,progress,"InOutBack") else local tick = getTickCount() - RankingBoard.tick local progress = tick/1000 RankingBoard.anim = interpolateBetween(390,0,0,0,0,0,progress,"OutBounce") end end Places = {} Numbers = {} function startResource () for i=1,32 do Numbers[i] = "" Places[i] = "" end addEventHandler ( "onClientRender", gRoot, RankingBoardDrawing ) fileDelete("rankingBoard-Puma_c.lua") end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), startResource ) function RankingBoardDrawing () DeathList = Numbers[1].." "..Places[1].."/newline/".. (Numbers[2].." "..Places[2].."/newline/").. (Numbers[3].." "..Places[3].."/newline/").. (Numbers[4].." "..Places[4].."/newline/").. (Numbers[5].." "..Places[5].."/newline/").. (Numbers[6].." "..Places[6].."/newline/").. (Numbers[7].." "..Places[7].."/newline/").. (Numbers[8].." "..Places[8].."/newline/").. (Numbers[9].." "..Places[9].."/newline/").. (Numbers[10].." "..Places[10].."/newline/").. (Numbers[11].." "..Places[11].."/newline/").. (Numbers[12].." "..Places[12].."/newline/").. (Numbers[13].." "..Places[13].."/newline/").. (Numbers[14].." "..Places[14].."/newline/").. (Numbers[15].." "..Places[15].."/newline/").. (Numbers[16].." "..Places[16].."/newline/").. (Numbers[17].." "..Places[17].."/newline/").. (Numbers[18].." "..Places[18].."/newline/").. (Numbers[19].." "..Places[19].."/newline/").. (Numbers[20].." "..Places[20].."/newline/").. (Numbers[21].." "..Places[21].."/newline/").. (Numbers[22].." "..Places[22].."/newline/").. (Numbers[23].." "..Places[23].."/newline/").. (Numbers[24].." "..Places[24].."/newline/").. (Numbers[25].." "..Places[25].."/newline/").. (Numbers[26].." "..Places[26].."/newline/").. (Numbers[27].." "..Places[27].."/newline/").. (Numbers[28].." "..Places[28].."/newline/").. (Numbers[29].." "..Places[29].."/newline/").. (Numbers[30].." "..Places[30].."/newline/").. (Numbers[31].." "..Places[31].."/newline/").. (Numbers[32].." "..Places[32].."/newline/") local obramowanie = string.gsub(DeathList,"#%x%x%x%x%x%x","#000000") dxDrawColorTextPuma(obramowanie, 14, sH/3-1, sW+1 , sH-1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorTextPuma(obramowanie, 14, sH/3, sW+1 , sH, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorTextPuma(obramowanie, 14, sH/3+1, sW+1 , sH+1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorTextPuma(obramowanie, 13, sH/3+1, sW , sH+1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorTextPuma(obramowanie, 12, sH/3+1, sW-1 , sH+1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorTextPuma(obramowanie, 12, sH/3, sW-1 , sH, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorTextPuma(obramowanie, 12, sH/3-1, sW-1 , sH-1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorTextPuma(obramowanie, 13, sH/3-1, sW , sH-1, tocolor(0,0,0,255), TextScale, TextFont , "left", "top") dxDrawColorTextPuma(DeathList, 13, sH/3, sW , sH, tocolor(255,255,255,255), TextScale, TextFont , "left", "top") end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ function Adding (pos,name,moveing) Numbers[pos] = "#FF4000"..pos.." #FFFFFF)" if not moveing then setTimer(function() if Numbers[pos] == "#FF4000"..pos.." #FFFFFF)" then Numbers[pos] = "#FF4000"..pos.." #FFFFFF)" else Numbers[pos] = "#FF4000"..pos.." #FFFFFF)" end end, 100, 5) else Numbers[pos] = "#FF4000"..pos.." #FFFFFF)" end Places[pos] = name end addEvent( "showPlayersOnRankingBoard", true ) addEventHandler( "showPlayersOnRankingBoard", gRoot, Adding ) function hideAll () for i=1,32 do Numbers[i] = "" Places[i] = "" end end addEvent( "hideAll", true ) addEventHandler( "hideAll", gRoot, hideAll )
  7. r, g, b is the color ( r = Red, g = Green, b = Blue ) + createTeam dose not have a skin argument, But you can do it like : Team = getPlayerTeam( player ) if Team and getTeamName(Team) == 'TeamName' then setElementModel( player, skinID ) end
  8. PaiN^

    Very simple!?

    I don't think so ....
  9. Put that well play the sound even if there was a login error ! You're welcome ..
  10. To put players names' in a grid list you can use this Useful Function created by 3NAD : ChangeGridListItemToPlayersName And it's almost the same for IP and Serial ! + --- server getElementsByType getAccountName getPlayerAccount triggerClientEvent --- client bindKey guiSetVisible showCursor
  11. You have to use triggerClientEvent !, Because onPlayerLogin is a server side event, And playSound is a client side function ..
  12. I don't think custom animations are added to MTA, Not yet at least ..
  13. .. غير, فتأكد من الويكي أول source له event مو لآزم يكون اللآعب, كل source ترى
  14. PaiN^

    Help me :)

    We don't accept requisites here, This section is to help scripters with there scripts ! You should surch in the community, You may find smething ..
  15. You should contact DZEK [ The script author ], So he can fix it for you and every one else ..
  16. PaiN^

    Admin Problem.

    Post your acl.xml ..
  17. You're welcome +If you want the MTATeam to work on it, You should open a topic in the Suggestion, If they liked it they may do it ...
  18. PaiN^

    help

    Try : marker1 = createMarker (801.03125, -1354.1396484375, -1.6207337379456, "checkpoint", 3, 255, 0, 0, 255) marker2 = createMarker(-1943.86328125, 144.46484375, 25.7109375, "checkpoint", 3, 255, 0, 0, 255) marker3 = createMarker(1449.900390625, 2631.845703125, 10.8203125, "checkpoint", 3, 255, 0, 0, 255) setElementAlpha ( marker1, 0 ) setElementAlpha ( marker2, 0 ) setElementAlpha ( marker3, 0 ) function (Veh) local vehName = getVehicleModelFromName(Veh) local x, y, z = getElementPosition ( source ) Vehicle = createVehicle (vehName, 1724.912109375, -1957.73828125, 13.539102554321 ) setElementAlpha ( marker1, 255 ) createBlipAttachedTo(marker1, 0) setElementData(marker1, "mk1", true ) warpPedIntoVehicle ( source, Vehicle) setTrainDerailable(Vehicle, false) setElementData(Vehicle, "caine", true ) outputChatBox("**The Tour Has Been Started",source,math.random(0, 255), math.random(0, 255), math.random(0, 255),true) end addEvent("folosestemasina",true) addEventHandler("folosestemasina",root, theJob ) function startour () getElementData(marker1, "mk1") givePlayerMoney(source, math.random (200, 600)) setElementAlpha ( marker2, 255 ) createBlipAttachedTo(marker1, 0) setElementData(marker2, "mk2", true ) end addEventHandler("onMarkerHit", marker1, startour) function startour2 () getElementData(marker2, "mk2") givePlayerMoney(source, math.random (200, 600)) getElementData(marker1, "mk1") destroyElement(marker1) setElementAlpha ( marker3, 255 ) createBlipAttachedTo(marker3, 0) end addEventHandler("onMarkerHit", marker2, startour2)
  19. You mean reloading a weapon ? If so, then i don't think so ...
  20. PaiN^

    help

    Maybe because you're creating the markers in a function that exist inside an event, Try this : function (Veh) local vehName = getVehicleIDFromName(Veh) local x, y, z = getElementPosition ( source ) Vehicle = createVehicle (vehName, 1724.912109375, -1957.73828125, 13.539102554321 ) marker1 = createMarker (801.03125, -1354.1396484375, -1.6207337379456, "checkpoint", 3, 255, 0, 0, 255) createBlipAttachedTo(marker1, 0) setElementData(marker1, "mk1", true ) warpPedIntoVehicle ( source, Vehicle) setTrainDerailable(Vehicle, false) setElementData(Vehicle, "caine", true ) outputChatBox("**The Tour Has Been Started",source,math.random(0, 255), math.random(0, 255), math.random(0, 255),true) end addEvent("folosestemasina",true) addEventHandler("folosestemasina",root, theJob ) function startour () getElementData(marker1, "mk1") givePlayerMoney(source, math.random (200, 600)) marker2 = createMarker(-1943.86328125, 144.46484375, 25.7109375, "checkpoint", 3, 255, 0, 0, 255) createBlipAttachedTo(marker1, 0) setElementData(marker2, "mk2", true ) end addEventHandler("onMarkerHit", marker1, startour) function startour2 () getElementData(marker2, "mk2") givePlayerMoney(source, math.random (200, 600)) getElementData(marker1, "mk1") destroyElement(marker1) marker3 = createMarker(1449.900390625, 2631.845703125, 10.8203125, "checkpoint", 3, 255, 0, 0, 255) createBlipAttachedTo(marker3, 0) end addEventHandler("onMarkerHit", marker2, startour2)
  21. طلال كوده صحيح.و ياليت تتكلم عربي في هذا القسم
  22. PaiN^

    help

    You want that after a player get warped in the train to create markers representing the destinations, But you don't know how to create markers ?
×
×
  • Create New...