Jump to content

bandi94

Members
  • Posts

    1,037
  • Joined

  • Last visited

Everything posted by bandi94

  1. local vehicleMarker = createMarker(1552.33, -1605.37, 12.5, 'cylinder', 2.0, 0, 0, 255, 150 ) function vehicleMarkerHit ( hitElement, matchingDimension ) if getElementType ( hitElement ) == "player" and getPlayerTeam ( hitElement ) ==getTeamFromName( "Police") then local vehicle = createVehicle ( 596, 1552.33, -1605.37, 13, 0, 0, 180 ) warpPedIntoVehicle(hitElement, vehicle) end end addEventHandler( "onMarkerHit", vehicleMarker , vehicleMarkerHit )
  2. oh man i don't have time to make a full chatbox (school .. ) i only wanna know if is possible to edit the current icon's special characters what are writen outputed in chat box whit alt key + number's to ad some new to the current Edit : like if you type alt+0174 it wil output a special characters now i wanna to add some new like .......
  3. i wanna pimp a litel up the chat box i have i question are some combination like alt+0174 alt+0153 alt+0135 and many many more now it is possible to add more i wanna add some chat icons(,,....) now teh combanation its not a problem it can be alt+.. i do whit canelEvent and outputchat box ...... only i need to ad that icon's thx for helping
  4. setVehicleColor getTeamColor() "onPlayerSpawn"
  5. and you just change the Dx drawing width or you are using some adjust for x,y, width,height bk if i add only x=.. y=.. and i change the width the image it will move and then i need to adjust the x back and there i get stuk how to calculate how much i need to adjust the x to stay on place ( bk i need to calculate from health 0-100 and speed 0-250 ) to don't move ....
  6. whit gui its litel easier positioning and tryed now whit Dx drawing and it same like if i create an image dxDrawImage(screenWidth/2 ,0 , n, 40, 'hpg.png') and if n is 100 and after i change n to 200 it move's a litel to right/left so i need to adjust the cordinates and here is the problem to change the width but only make the bar shorter to don't move it left or right
  7. whit that n i tryed to move back the healtbar but i deletet that line this is the full code (the healt bar part. I have the timer and the FPS ping part but that is not a problem .. ) now if i have health set to 1-10 the bar is ok if i set it to a bigger number 40-50 again start to moving now to right .... -------------------------elet sebeseg------------- local main = guiCreateStaticImage( 0.81, 0.056, 0.165, 0.11,"fo.png", true ) local zold=guiCreateStaticImage( 0.190 ,0.372, 1 , 0.233 ,"hpg.png", true,main) local health=50 local n =health / 100 *1 guiSetSize(zold,n,0.23,true) the 2 image what i use on guiCreateStaticImage pic 1 http://imageshack.us/photo/my-images/338/16211163.png/ pic 2 http://imageshack.us/photo/my-images/811/hpg.png/
  8. i hope you understund me better whit the pictures pic 1 n=0.5 the bar is fine local main = guiCreateStaticImage( 0.81, 0.056, 0.165, 0.11,"fo.png", true ) local zold=guiCreateStaticImage( 0.11 ,0.38, .1 , 0.033 ,"hpg.png", true,main) local n =0.5 guiSetSize(zold,n,0.23,true) http://imageshack.us/photo/my-images/94/problem1n.png/ local main = guiCreateStaticImage( 0.81, 0.056, 0.165, 0.11,"fo.png", true ) local zold=guiCreateStaticImage( 0.11 ,0.38, .1 , 0.033 ,"hpg.png", true,main) local n =0.2 guiSetSize(zold,n,0.23,true) pic 2 n=0.2 after i lost 30 hp now my bar is smaller in width but he moved to left i don't wanna to move the bar to left only to get smaler or bigger in width http://imageshack.us/photo/my-images/571/problem2e.png/ thx
  9. oh i added that line by mistake i tryed to solve the problem whit changing the Position but i need some equation i figured up that if the n=0.05 then the after the equation i need to get 0.19 and whit same equation whit n=1 i need to get 0.032 now i a working to find out the equation or is a easier way ?
  10. i make a new health and speed bar now if i set n for 0.5 the bar is ok ( |_____ ...... | the bar ____ is the progress bar and ... is only for space) if i set it to a smaler number ex. 0.2 the bar move to the center ( |..... __ ..... |) how can i make it to don't move the bar to the center to stay at the begin thx local main = guiCreateStaticImage( 0.81, 0.056, 0.165, 0.11,"fo.png", true ) local zold=guiCreateStaticImage( 0.16 ,0.38, .1 , 0.033 ,"hpg.png", true,main) local n =0.5 guiSetSize(zold,n,0.23,true)
  11. no more need i find it its locate at race_client.lua deleted some lines and done
  12. i start making a new healt speed nos ..... bar and i can't disable the old healt and speed bar ( in the upper right) where is the script part for that to delete it thx
  13. and how to fix the bug if you don't post the script ...
  14. server: function movePlayer(source) x, y, z = getElementPosition(source) setElementPosition(source, x + 20, y + 50, z + 80) end addEvent("movePlayerOnBatHit", true) addEventHandler("movePlayerOnBatHit", getRootElement(), movePlayer)
  15. try to add a timer ex: maybe you call the createBlipAtachedTo to fast after Spawn (i have some problem whit "onPlayerLogin " it get bad Argument getPlayerAccount after i add 1s timer it work's fine) function timer() setTimer(blipAdmins,1000,0,source) end addEventHandler("onPlayerSpawn",getRootElement(),timer)
  16. thx man i tryed to pass an extra argument buy i faild easier way copy paste the set next map code line's changed the command name from nextmap to something else on buy system executeCommandHandler(the new one) and on the new one i deleted the check for admin line's and its working fine
  17. setTimer (moveObject , 3000 , 1, moving time , gate54, x, y ,z) the 3000,1 is the timer and you need to add the time for gate move
  18. i a make a next map shot system now i use the admin panel set next map funtion when you press the next map on admin panel it trigger the servermaps.lua on teh function is a check :if checkClient( true, source, 'setNextMap', mapName ) then return end this check if you are admin if not it debug admin security waring player whitout admin rights trigger admin panel functioln bla bal now i deleted the line and after this line is ExecuteCommandHandler("nextmap",mapname) now if i buy a map from my shop whit admin rights it set the next map if i don't have admin rights adn i buy a map no more Admin security warning but the map is not set for next now i think on command handler nextmap is again a right's check but i don't find where is the addCommandHandler("nextmap",..) now if somebody make a similar system or you know what is the problem or where is the addCommandHandler("nextmap",..) pls help me thx or how can i amke a setnext map function i tryed whit changeGamemodeMap() but it don't work i use gamemodes = call(getResourceFromName("mapmanager"), "getRunningGamemode") local maps = call(getResourceFromName("mapmanager"), "getMapsCompatibleWithGamemode",gamemodes ) and whit a for in pairs(maps) i get the map name and send it to client for a map name list and then when pres the buy buton it send to the server the map name again for in pairs() i get themap name and then if map name == whit map name from client then changeGamemodeMap(maps ) but i get bad argument changeGamemodeMap on argument 1 get nil
  19. militaryVehicles = { [523]=true,[598]=true,[596]=true,[597]=true,[490]=true, [470]=true } militarySkin = {["skinID"]=true,["skinID"]=true} function militaryenterVehicle ( player, seat, jacked ) if ( militaryVehicles[getElementModel ( source )] ) and ( not militarySkin[(getPedSkin (player ))] ) and ( seat == 0 ) then outputChatBox ( "You aren't a Military , you mayn't drive this.", player ) --and tell the player why cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), militaryenterVehicle )
  20. where is theam teamRoberes only you add local teamRoberes but don't creatated a team .. where is teamPolice again you aded only local teamPolice use bimdKey("keyname","down",function name) and getPlayerAccount() setAccountData() getAccountData()
  21. function createFreikaufGUI() gWindow["freikaufen"] = guiCreateWindow(250,162,310,331,"Auto freikaufen",false) freiKaufLb = guiCreateLabel(26,22,253,47,"Auto freikaufen",false,gWindow["freikaufen"]) guiSetFont(freiKaufLb,"sa-gothic") fText = guiCreateLabel(33,78,234,85,"Hier kannst du dein beschlagnahmtes\nAuto freikaufen! Die Gebühren liegen bei\n200$ pro Freikauf! Gehe anschließend zur\nVerwahrungsstelle um dein Auto\nabzuholen. Der Eintritt liegt bei 150$!",false,gWindow["freikaufen"]) guiSetFont(fText,"default-bold-small") fSlot = guiCreateLabel(37,184,235,35,"Slot des Autos? (1-9) : ",false,gWindow["freikaufen"]) guiSetFont(fSlot,"sa-header") fEdit = guiCreateEdit(38,231,233,34,"",false,gWindow["freikaufen"]) fBtn = guiCreateButton(41,274,228,40,"Auto freikaufen",false,gWindow["freikaufen"]) guiSetFont(fBtn,"sa-header") guiSetVisible(gWindow["freikaufen"], true) showCursor(true) addEventHandler("onClientGUIClick", fBtn, function() triggerServerEvent ( "freiKauf", getLocalPlayer(), getLocalPlayer(),guiGetText ( fEdit ) ) end) end addCommandHandler("buykaution", createFreikaufGUI) it output the name bk you trigger the Serer event whit only 1 argument "guiGetText ( fEdit )" and on the server side you get 2 argument's function(player,txt) and then the player get the fEdit txt and the txt is nil
  22. FIXED I SOLVE THE PROBLEM THX FOR ALL ok i make a big mistake( a sh***) i have on account data saved a win counter the old script it was lag it loop's something over and over and i start make it again from 0 and i make a big sh** and i save the win count (number's) as string and i have a win top counter and now bk is saved as tostring and the "if" don't compare it like the number's (1>5>10...) it compare from the string length ( "1" length is 1 , "300" length is 3 and it miss up the top counter ( who have 1 win is top 1 and who have over 1000 is top 300-400) now is a way to convert the string bk to number's a lot of player's play a lot for that win socre and i don't wanna to reset the win's thx for helping i hope is a way Edit: i have an idea but i need litel help how to separate the characters like if the string is "431" then character1="4" character2="3" character3="1" and then i compare each character like if character1=="1" the characterok1=1 elseif character1=="2" then characterok1=2 .... but i don't know how the separate the characters from a string
  23. local teamadmin= createTeam("Admin's",255,255,255) ---you can change the color local teamg= createTeam("Guests",255,255,255) ---you can change the color function onJoin(player) setPlayerTeam(player, teamg) end function onlogin() local account=getPlayerAccount(source) if not isObjectInACLGroup ( "user." ..getAccountName(account) , aclGetGroup ( "Admin" ) ) return end setPlayerTeam(source, teamadmin) end function timerl() setTimer(onlogin,1000,1,source) end addEventHandler("onPlayerLogin", getRootElement(), timerl) function timer() setTimer(onJoin,1000,1,source) end addEventHandler("onPlayerJoin", getRootElement(), onJoin) meta you need to save the code whit name "team" <meta> <script src="team.lua" type="server" /> </meta>
  24. can you tell what error you get in the team script (use /debugscript 3)
×
×
  • Create New...