
jkub
Members-
Posts
342 -
Joined
-
Last visited
Everything posted by jkub
-
is there any event for a player changing skins because i need it for a team script im workin on.. function cop1 ( thePlayer ) local skin = getPlayerSkin ( thePlayer ) if ( skin == 280 ) then setPlayerTeam ( thePlayer, police ) else return end end
-
ya i now notice that the event "onMarkerHit" means it will be triggered by any marker... until i specify a specific marker such as
-
thanks 50 that seemed to work great im gonna look into this some more and check out some events
-
I am working on an interior script that uses more then 1 marker to spawnplayers different places and the second marker spawns the player back to the first markers destination I want the first marker to set the player to lvpd (wich it does) and the second one INSIDE THE LVPD INTERIOR to set the player to the atrium interior wich it just sets the player to the first markers destination.? im assuming its because "onMarkerHit" is already handled to the first function and will do any thing in the first function instead? i have no idea how to get this to work can u plz help me lvpd = createMarker ( -2521.1308, -623.9481, 133.1000, "cylinder", 1.5, 255, 255, 0, 150, getRootElement() ) attrium = createMarker ( 238.7158, 138.6332, 1003.0234, "arrow", 1.5, 0, 0, 255, 150, getRootElement() ) setElementDimension ( attrium, 18 ) setElementInterior ( attrium, 18, -238.1308, -623.9481, 133.1000 ) function lvpdhq ( hitPlayer, matchingDimension ) if getElementType ( hitPlayer )=="player" then spawnPlayer ( hitPlayer, 289.7703, 171.7460, 1007.1790 , 0, 0, 3, 0, nil ) end end addEventHandler ( "onMarkerHit", getRootElement(), lvpdhq ) addCommandHandler ( "lvpdhq", lvpd ) function atrium ( hitPlayer, matchingDimension ) if attrium then spawnPlayer ( hitPlayer, 1726.1370, -1645.2300, 20.2260, 0, 0, 18, 0, nil ) else return end end addEventHandler ( "onMarkerHit", attrium, atrium )
-
i just tryed the matrix thing instead and it does the same exact thing wich gives me that attempt to call global getCameraMatrix (a nil value) ?
-
im trying to use getCameraPosition in a script and it is not working it says its a nil value? i simply want it to get the pos of the player and set the cam to fixed then set the position to the pos it got from the player function newCam ( source ) setCameraMode ( source, "fixed" ) local x, y, z = getCameraPosition ( source ) setCameraPosition ( source, x, y, z ) end
-
ive tryed using the setControlState method and I used settimer to mess with the acceleration control setControlState ( thePlayer, "accelerate", true ) -- I assume that would lock the accelerator timer = setTimer ( setControlState, 200, 0, thePlayer, "accelerate", false ) --this would disable the accelerator every 0.2 seconds but how would I constantly rotate between enabling and disabling acceleration because I know that above would enable the accel then 0.2 seconds later disable it. how would i loop
-
i was recently looking at someone elses post and I saw someone say somthin about cruise control. I thought that was a nice start for a noob such as myself so i jocked his style and came up with something. I have not got to test it yet but I know its not gonna work lol function cruise ( thePlayer, theVehicle ) local theVehicle = getPlayerOccupiedVehicle ( thePlayer ) local speedx, speedy, speedz = getElementVelocity ( theVehicle ) local speed = getElementVelocity setElementVelocity ( theVehicle, speedx, speedy, speedz ) if speed < speedx and speedy and speedz then setElementVelocity ( theVehicle, speedx, speedy, speedz ) end end addCommandHandler ( "cruise", cruise ) bindKey ( "thePlayer", "c", "down" )
-
yea all ports are open ive used dmz like I always have. and I made sure dmz was pointing at the right ip...
-
Hello there its me again but this time with one of those real common problems. I have made a change to my router setup, I have enabled qos ( quality of service ) on it and now my server will not show up in the list... ive tryed changing around the settings on the qos page and couldent get it to show up. So I finally got tired of it and put my router back to the way it was before... But now my server will not show up in the list no more even with my router back to the way it was before. ive went through everything and checked ips and im pretty sure it is back to the way it was but my server still will not show up on the list... plz help me...?
-
thanks ma. i added the resource to the admin section in the acl like u said and it worked fine
-
aw ok im gonna try this when i get home. and about the settimer on the killmininoob function i think i was gonna make that into somthin but i never got to it and I was just lazy and never took it out of the script before i posted it here lol. but I will try that though and ill get back at ya
-
here is a scipt i made a while back that puts a message to the chatbox if anybody pulls out any illegal weapon and also disable fire for them. but i wanted to add another fucntion if the gun is a minigun i want it to kick the player. i have already tried that but it does not kick the player, in the debug it says access denied @ 'kickPlayer' how would i work around that? function minigun ( previousWeaponID, currentWeaponID ) --when a player switches his weapon if currentWeaponID == 38 or currentWeaponID == 35 or currentWeaponID == 36 or currentWeaponID == 37 then --if the weapon ID is minigun toggleControl ( source, "fire", false ) --disable the fire button toggleControl ( source, "action", false ) --disable the action button ( can also fire ) local name = getClientName ( source ) --get the noobs name local weapon = getWeaponNameFromID ( currentWeaponID ) outputChatBox ( name.. " has pulled out a " ..weapon, getRootElement(), 255, 100, 0 ) else --otherwise toggleControl ( source, "fire", true ) --enable it toggleControl ( source, "action", true ) --enable it end end --add an event handler for onPlayerWeaponSwitch addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), minigun ) function killMiniNoob ( previousWeaponID, currentWeaponID ) -- u know the drill if currentWeaponID == 38 then setElementHealth ( source, - 5 ) setTimer ( killMiniNoob, 200, 0, source, -5 ) kickPlayer ( source, source, "minigun" ) end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), killMiniNoob )
-
tryed that but it does not output anything. it may output warnings and errors to other scripts though lol
-
ive tryed that ive tryed reconnecting. Ive tryed connecting to the server with my other computer and still nothing... ive converted the map to lua and it worked before but for some reason it just stopped working out of nowhere? a = createObject(980, 213.92637634277, 1875.1550292969, 13.840625762939, 0, 0, 0) b = createObject(1537, 226.82362365723, 1858.4333496094, 13.14695930481, 0, 0, 269.99987792969) c = createObject(1537, 244.99589538574, 1862.7609863281, 20.102298736572, 90, 0, 130) d = createObject(3409, 246.61138916016, 1860.2017822266, 13.084012031555, 0, 0, 0) e = createObject(3409, 242.61138916016, 1860.2017822266, 13.084012031555, 0, 0, 0) f = createObject(1537, 244.29592895508, 1862.1608886719, 20.082298278809, 90, 0, 130) g = createObject(1276, 239.75846862793, 1862.0891113281, 13.939598083496, 0, 0, 0) h = createObject(1537, 244.09593200684, 1862.5607910156, 20.062297821045, 90, 0, 130) i = createObject(1537, 244.69590759277, 1862.9608154297, 20.042297363281, 90, 0, 130) j = createObject(3786, 268.77059936523, 1884.0712890625, -29.59375, 0, 90, 90) k = createObject(1213, 273.06036376953, 1888.0516357422, 16.63805770874, 0, 0, 0) l = createObject(1213, 273.06036376953, 1880.0516357422, 16.63805770874, 0, 0, 0) m = createObject(1213, 264.46038818359, 1879.8516845703, 16.63805770874, 0, 0, 0) n = createObject(1213, 264.46038818359, 1888.1516113281, 16.618057250977, 0, 0, 0) o = createObject(1213, 217.85354614258, 1875.6845703125, 16.640625, 0, 0, 0) p = createObject(1213, 209.85354614258, 1875.6845703125, 16.640625, 0, 0, 0) q = createObject(1213, 213.85354614258, 1875.6845703125, 16.640625, 0, 0, 0) r = createObject(1215, 273.23599243164, 1885.8581542969, 16.448057174683, 0, 0, 0) s = createObject(1215, 264.13598632813, 1885.8581542969, 16.448057174683, 0, 0, 0) t = createObject(1215, 215.58479309082, 1875.4400634766, 16.640625, 0, 0, 0) u = createObject(1215, 211.58479309082, 1875.4400634766, 16.640625, 0, 0, 0) v = createObject(1213, 264.1130065918, 1883.4056396484, 16.675266265869, 0, 0, 0) w = createObject(1213, 273.21301269531, 1883.4056396484, 16.665267944336, 0, 0, 0) x = createObject(1215, 273.35083007813, 1881.8179931641, 16.440624237061, 0, 0, 0) y = createObject(2047, 136.61434936523, 1941.8325195313, 22.251081466675, 0, 0, 180) z = createObject(1215, 264.15087890625, 1881.8179931641, 16.240623474121, 0, 0, 0) aa = createObject(14467, 221.26031494141, 1868.4501953125, 14.140625, 0, 0, 180) ab = createObject(3278, 239.71658325195, 1862.7186279297, 14.53378868103, 0, 0, 0) ac = createObject(1318, 239.60626220703, 1862.7371826172, 15.028652191162, 0, 0, 90) ad = createObject(1318, 240.60626220703, 1862.7371826172, 15.028652191162, 45, 0, 90) ae = createObject(1318, 238.60626220703, 1862.7371826172, 15.028652191162, 315, 0, 90) af = createObject(980, 268.31341552734, 1885.1009521484, 16.275241851807, 90, 90, 90) ag = createObject(980, 268.31341552734, 1882.6009521484, 16.275241851807, 90, 90, 90) ah = createObject(2780, 212.91438293457, 1812.0213623047, 19.3671875, 0, 0, 0) ai = createObject(1213, 221.46495056152, 1868.1910400391, 14.140625, 0, 0, 0) aj = createObject(980, 213.91567993164, 1875.3431396484, 13.843216896057, 0, 0, 0) ak = createObject(8661, 1484.0900878906, 1183.3480224609, 9.8323125839233, 0, 0, 90) al = createObject(8661, 1464.1101074219, 1183.3480224609, 9.8323125839233, 0, 0, 90) am = createObject(16061, 1491.4222412109, 1176.8197021484, 9.6303081512451, 0, 0, 90) an = createObject(669, 1527.9686279297, 1184.7604980469, 10.032313346863, 0, 0, 0) ao = createObject(669, 1527.9686279297, 1194.7604980469, 10.032313346863, 0, 0, 0) ap = createObject(669, 1537.9686279297, 1189.7604980469, 10.032313346863, 0, 0, 0) aq = createObject(669, 1537.9686279297, 1189.7604980469, 10.032313346863, 0, 0, 0) ar = createObject(2964, 1517.5870361328, 1186.3315429688, 11.258434295654, 0, 0, 182) as = createObject(2696, 1518.3778076172, 1200.0534667969, 13.278434753418, 0, 0, 0) at = createObject(2995, 1517.2102050781, 1186.3741455078, 12.190433502197, 0, 0, 0) au = createObject(2996, 1517.0065917969, 1186.2536621094, 12.18643283844, 0, 0, 0) av = createObject(2997, 1517.072265625, 1186.4230957031, 12.191432952881, 0, 0, 0) aw = createObject(2998, 1517.1212158203, 1186.3502197266, 12.188433647156, 0, 0, 0) ax = createObject(3000, 1517.7817382813, 1186.5334472656, 12.188433647156, 0, 0, 0) ay = createObject(3000, 1517.4776611328, 1186.0656738281, 12.198432922363, 80, 70, 90) az = createObject(3001, 1517.2896728516, 1186.6356201172, 12.188433647156, 0, 0, 0) ba = createObject(3003, 1518.0798339844, 1186.5930175781, 12.186434745789, 0, 0, 0) bb = createObject(2960, 1493.4094238281, 1182.2673339844, 9.9584321975708, 90, 0, 0) bc = createObject(2960, 1488.7895507813, 1182.2673339844, 9.9584321975708, 90, 0, 0) bd = createObject(2960, 1484.1695556641, 1182.2673339844, 9.9584321975708, 90, 0, 0) be = createObject(2960, 1479.5496826172, 1182.2673339844, 9.9584321975708, 90, 0, 0) bf = createObject(2960, 1474.9498291016, 1182.2673339844, 9.9584321975708, 90, 0, 0) bg = createObject(2960, 1470.3498535156, 1182.2673339844, 9.9584321975708, 90, 0, 0) bh = createObject(2960, 1465.7498779297, 1182.2673339844, 9.9584321975708, 90, 0, 0) bi = createObject(2960, 1461.1499023438, 1182.2673339844, 9.9584321975708, 90, 0, 0) bj = createObject(2960, 1459.6149902344, 1182.2673339844, 9.9584321975708, 90, 0, 0)
-
hello i have the map editor called "offedit" and I used it to make a map at lv airport of a base I made and saved it... it was around 50 objects but then a couple days later it would not load anymore... it does not want to load all the objects in the map. it only loads like 10 objects in the map but it wont load the map all the way. I even opend the map myself in my server directory on my pc and it looked fine it was all correct like it was before. since the map was made by offedit the maps are in an o23 format... i changed it around a bit and made the format map instead and put it inside a correctly working resource but it still wouldent load. this has happend several times before where a map just dont want to load anymore no matter how you do it it will not load all though it says it does the objects are not visible. i hate this bug ive busted my ass on these maps can i plz get some help. thank u
-
I have recently made a script that makes 4 teams for the server... thats pretty much it but ive tryed making it to where the players were automaticly set to the right team based on either their ip, playername, and others. I have tryed all the ways i could find to make it to where players are automaticly set to a team rather it would be ip or name. but i couldent get them to work....lets say we did it by playername local pname = getClientName ( source ) --this is where im not doing it right for sure if (pname)++"Dr.PhillyBlunt" then and also i have tryed other ways but couldent get any of them to work. how would i do the if the name is "_" and make this work right?
-
k then i c. but also wat if i wanted to set the camera to watch an object instead of a player>>>>. ive already tryed doing that several differentways and had no luck getting the camera to watch an object. I assumed that the target of setCameraTarget dosent have to be a player, but maybe could be a object or vehicle instead, since it is an alement, ive tryed setting it towards botch vehicles and objects and i can only get it to work with players?
-
I made a script to spectate random players, but is supposed to make the camera have a green tint to it but i cant get that to work right. and i am using the fade camera function anyway here it is... function watch1 ( source, commandName ) local x, y, z = getElementPosition( source ) local randomPlayer = getRandomPlayer ( ) setCameraTarget ( source, randomPlayer ) fadeCamera ( source, false, 60, 30, 100, 0 ) end addCommandHandler ( "watch", watch1 ) but if i fade the camera in it will keep going until it is opaqe green but if i do it false it will just do nothing at all?
-
I have had multiple request to get some kind of jailing system in my server. but i guess it could be somthing simple. like I make an enclosed space somewhere in the map with my map editor and when ur arrested have the criminal be warped into the space and able not to use any functions for 1 minute. he will not be able to do any freeroam commands. after that 1 minute is up he is released back at the regular spawn point of the server with all of his functions enabled again. anyway the way of arresting should be 1 hitting the player with a nightstick ONCE 2 as a alternative to the first way>>> via admin only command I remember seeing someone with a script similir on the forum.
-
I want it to where you shoot someone in there head and you get $1000 dollars. but any other limbs you only get $250 but instead this gives you the combined $1250 anywhere you kill someone? function rewardOnWasted ( ammo, killer, killerweapon, bodypart ) --if there is a killer, and that killer is not the same person as whoever died if ( killer ) and ( killer ~= source ) then givePlayerMoney ( killer, 250 ) --reward the killer with 1000 cash. if ( bodypart ) and ( bodypart ~= "9" ) then givePlayerMoney ( killer, 1000 ) end end end addEventHandler ( "onPlayerWasted", getRootElement(), rewardOnWasted ) --attach the rewardOnWasted function to the relevant event.
-
ok this is the 4th time this happend. I was minding my own buisnees listening to music and i wanted to add another resource to my resource folder but once i did the server deleted every resource in my resource folder leaving my server to nothing omfg why the fuck does this keep happening. i didnt even refresh it usually happens when i refresh it will just say stopping each resource in the console then it deletes them all wtf i put too much work into this for it to do that this is stupid someone please help me
-
It doesent give an error but it dont move it back either?
-
wait lol i just relized I wont be able to do that will i? because the settimer has to call a function to do and obviously it cant call the only one i have because that is the same function i used to open the gate