Jump to content

Cassandra

Members
  • Posts

    200
  • Joined

  • Last visited

Everything posted by Cassandra

  1. Added few table functions at the main post which are useful and efficient. And also, please post the function including the credit if it's not yours.
  2. Apologize for that. I've updated the thread.
  3. I see you are caring intensively for the security.
  4. For security reasons. Nice function you got there but I still prefer the default xml functions.
  5. I know there is an article about it on wiki but a thread is better. You can post below some useful functions but please don't post untested code and don't go offtopic. Detects if a player is in a range of point. function isPlayerInRangeOfPoint(player, range, x, y, z) local plx, ply, plz = getElementPosition(player) return ((x-plx)^2+(y-ply)^2+(z-plz)^2)^0.5<=range end Gets the chance in percentage. function percentageChance(value) if value >= math.random(1, 100) then return true else return false end end Trim the extra spaces of a string. function str.Trim(str) str = string.gsub(str, '^%s+', '') str = string.gsub(str, '%s+$', '') return str end Repeat a string concerning security. function str.Repeat(str, num) if num ~= nil and tonumber(num) ~= nil and tonumber(num) > 0 then return string.rep(str, num) else return '' end end Pulls back the maximum index for the table specified and does not needs to be in sequential or contain none Numbers. function tableMax(thetable) if type(thetable) == "table" then local retNum = 0; for Key,Values in pairs(thetable) do if type(Key) == "number" and Key > retNum then retNum = Key end end return retNum else return end end Checks a table to see if the key is the defined value(thevalue) in lower case. function tableLowCheck(thetable, thevalue) if type(thetable) == "table" then local returnValues = {} local nextValueNum = 1 for Key, Value in pairs(thetable) do if strlower(Key) == strlower(thevalue) then returnValues[nextValueNum] = Key nextValueNum = nextValueNum + 1 end end return unpack(returnValues) else return end end Checks a table to see if the key is the defined value(thevalue) in upper case. function tableUpCheck(thetable, thevalue) if type(thetable) == "table" then local returnValues = {} local nextValueNum = 1 for Key, Value in pairs(thetable) do if strupper(Key) == strupper(thevalue) then returnValues[nextValueNum] = Key nextValueNum = nextValueNum + 1 end end return unpack(returnValues) else return end end Copies a table unlikely pointing to it. function tableCopy(thetable) local dest = {} if type(thetable) == "table" then for Key,Value in pairs(thetable) do if type(Key) == "table" then Key = CopyTable(Key) end if type(Value) == "table" then Value = CopyTable(Value) end dest[Key] = Value end else dest = thetable end return dest end
  6. Check this thread out. viewtopic.php?f=91&t=26541
  7. What's you internet bandwidth?
  8. Yes, it's possible. See this # # see default.ide for id ranges # # flags: # 0x01 gets streamed out after 1 car is generated (for dumpsters, MrWoopy etc) # 0x02 Don't use. Used by code internally. cars # Id, Model name, Txd name, Type HandlingId Game name, Anims Class Frq flags Comprules # # cars have two extra fields wheelmodelId and wheel scale # planes have one extra field model id of low level of detail 400, landstal, landstal, car, LANDSTAL, LANDSTK, null, normal, 10, 0, 0, -1, 0.768, 0.768, 0 401, bravura, bravura, car, BRAVURA, BRAVURA, null, poorfamily, 10, 0, 0, -1, 0.74, 0.74, 0 402, buffalo, buffalo, car, BUFFALO, BUFFALO, null, executive, 5, 0, 0, -1, 0.7, 0.7, 0 403, linerun, linerun, car, LINERUN, LINERUN, truck, worker, 6, 0, 0, -1, 1.1, 1.1, -1 404, peren, peren, car, PEREN, PEREN, null, poorfamily, 10, 0, 0, -1, 0.66, 0.66, 0 405, sentinel, sentinel, car, SENTINEL, SENTINL, null, richfamily, 10, 0, 0, -1, 0.7, 0.7, 0 406, dumper, dumper, mtruck, DUMPER, DUMPER, truck, worker, 5, 1, 0, -1, 2.28, 2.28, -1 407, firetruk, firetruk, car, FIRETRUK, FIRETRK, truck, ignore, 10, 0, 0, -1, 1.0, 1.0, -1 408, trash, trash, car, TRASH, TRASHM, null, worker, 5, 0, 0, -1, 1.06, 1.06, -1 409, stretch, stretch, car, STRETCH, STRETCH, null, executive, 5, 0, 0, -1, 0.75, 0.75, 0 410, manana, manana, car, MANANA, MANANA, null, poorfamily, 10, 0, 0, -1, 0.62, 0.62, 0 411, infernus, infernus, car, INFERNUS, INFERNU, null, executive, 5, 0, 0, -1, 0.7, 0.7, 0 412, voodoo, voodoo, car, VOODOO, VOODOO, null, poorfamily, 10, 0, 0, -1, 0.7, 0.7, 0 413, pony, pony, car, PONY, PONY, van, worker, 10, 0, 0, -1, 0.72, 0.72, -1 414, mule, mule, car, MULE, MULE, null, worker, 10, 0, 0, -1, 0.76, 0.76, -1 415, cheetah, cheetah, car, CHEETAH, CHEETAH, null, executive, 5, 0, 0, -1, 0.68, 0.68, 0 416, ambulan, ambulan, car, AMBULAN, AMBULAN, van, ignore, 10, 0, 0, -1, 0.864, 0.864, -1 417, leviathn, leviathn, heli, LEVIATHN, LEVIATH, null, ignore, 5, 0, 0, -1, 0.54, 0.4, -1 418, moonbeam, moonbeam, car, MOONBEAM, MOONBM, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 419, esperant, esperant, car, ESPERANT, ESPERAN, null, normal, 10, 0, 0, -1, 0.64, 0.64, 0 420, taxi, taxi, car, TAXI, TAXI, null, taxi, 10, 0, 1f10, -1, 0.7, 0.7, 0 421, washing, washing, car, WASHING, WASHING, null, richfamily, 10, 0, 0, -1, 0.65, 0.65, 0 422, bobcat, bobcat, car, BOBCAT, BOBCAT, null, worker, 10, 0, 0, -1, 0.7, 0.7, 0 423, mrwhoop, mrwhoop, car, MRWHOOP, WHOOPEE, null, worker, 4, 1, 0, -1, 0.7, 0.7, -1 424, bfinject, bfinject, car, BFINJECT, BFINJC, BF_injection, executive, 6, 0, 0, -1, 0.84, 0.92, -1 425, hunter, hunter, heli, HUNTER, HUNTER, rustler,ignore, 10, 0, 0, -1, 0.64, 0.4, -1 426, premier, premier, car, PREMIER, PREMIER, null, richfamily, 10, 0, 0, -1, 0.7, 0.7, 0 427, enforcer, enforcer, car, ENFORCER, ENFORCR, van, ignore, 10, 0, 0, -1, 0.936, 0.936, -1 428, securica, securica, car, SECURICA, SECURI, van, big, 4, 0, 3f10, -1, 0.914, 0.914, -1 429, banshee, banshee, car, BANSHEE, BANSHEE, null, executive, 5, 0, 0, -1, 0.7, 0.7, 0 430, predator, predator, boat, PREDATOR, PREDATR, null, ignore, 10, 0, 0 431, bus, bus, car, BUS, BUS, bus, normal, 5, 0, 0, -1, 1, 1, -1 432, rhino, rhino, car, RHINO, RHINO, tank, ignore, 10, 0, 0, -1, 1.3, 1.3, -1 433, barracks, barracks, car, BARRACKS, BARRCKS, truck, ignore, 4, 0, 1f10, -1, 1.2, 1.2, -1 434, hotknife, hotknife, car, HOTKNIFE, HOTKNIF, null, executive, 4, 0, 0, -1, 0.72, 0.8, -1 435, artict1, artict1, trailer, ARTICT1, ARTICT1, null, ignore, 6, 0, 0, -1, 1.1, 1.1, -1 436, previon, previon, car, PREVION, PREVION, null, poorfamily, 10, 0, 0, -1, 0.7, 0.7, 0 437, coach, coach, car, COACH, COACH, coach, normal, 5, 0, 1f10, -1, 1.0, 1.0, -1 438, cabbie, cabbie, car, CABBIE, CABBIE, null, taxi, 6, 0, 1f10, -1, 0.7, 0.7, 0 439, stallion, stallion, car, STALLION, STALION, null, poorfamily, 10, 0, 3210, -1, 0.7, 0.7, 0 440, rumpo, rumpo, car, RUMPO, RUMPO, van, poorfamily, 10, 0, 0, -1, 0.7, 0.7, -1 441, rcbandit, rcbandit, car, RCBANDIT, RCBANDT, null, ignore, 1, 0, 0, -1, 0.25, 0.25, -1 442, romero, romero, car, ROMERO, ROMERO, null, normal, 4, 0, 0, -1, 0.68, 0.68, 0 443, packer, packer, car, PACKER, PACKER, truck, worker, 5, 0, 0, -1, 1.082, 1.082, -1 444, monster, monster, mtruck, MONSTER, MONSTER, truck, ignore, 1, 0, 0, -1, 1.5, 1.5, -1 445, admiral, admiral, car, ADMIRAL, ADMIRAL, null, richfamily, 10, 0, 0, -1, 0.68, 0.68, 0 446, squalo, squalo, boat, SQUALO, SQUALO, null, ignore, 10, 0, 0, 447, seaspar, seaspar, heli, SEASPAR, SEASPAR, null, ignore, 10, 0, 0, -1, 0.7, 0.7, -1 448, pizzaboy, pizzaboy, bike, MOPED, PIZZABO, bikev, normal, 4, 1, 0, 16, 0.464, 0.464, -1 449, tram, tram, train, TRAM, TRAM, van, ignore, 10, 0, 1012, -1, 0.78, 0.78, -1 450, artict2, artict2, trailer, ARTICT2, ARTICT2, null, ignore, 6, 0, 0, -1, 1.1, 1.1, -1 451, turismo, turismo, car, TURISMO, TURISMO, null, executive, 4, 0, 0, -1, 0.7, 0.75, 0 452, speeder, speeder, boat, SPEEDER, SPEEDER, null, leisureboat, 10, 0, 4fff 453, reefer, reefer, boat, REEFER, REEFER, null, workerboat, 10, 0, 3f01 454, tropic, tropic, boat, TROPIC, TROPIC, null, leisureboat, 10, 0, 4fff 455, flatbed, flatbed, car, FLATBED, FLATBED, truck, worker, 5, 0, 4fff, -1, 1.2, 1.2, -1 456, yankee, yankee, car, YANKEE, YANKEE, null, worker, 10, 0, 0, -1, 0.84, 0.84, -1 457, caddy, caddy, car, GOLFCART, CADDY, null, richfamily, 1, 0, 30123345, -1, 0.5, 0.5, -1 458, solair, solair, car, SOLAIR, SOLAIR, null, normal, 10, 0, 0, -1, 0.72, 0.72, 0 459, topfun, topfun, car, TOPFUN, TOPFUN, van, ignore, 1, 0, 0, -1, 0.7, 0.7, -1 460, skimmer, skimmer, plane, SEAPLANE, SKIMMER, null, ignore, 5, 0, 0 461, pcj600, pcj600, bike, BIKE, PCJ600, bikes, motorbike, 10, 0, 0, 16, 0.67, 0.67, -1 462, faggio, faggio, bike, MOPED, FAGGIO, bikev, moped, 10, 0, 0, 16, 0.464, 0.464, -1 463, freeway, freeway, bike, FREEWAY, FREEWAY, bikeh, motorbike, 10, 0, 0, 23, 0.654, 0.654, -1 464, rcbaron, rcbaron, plane, RCBARON, RCBARON, null, ignore, 1, 0, 0, -1, 0.25, 0.25, -1 465, rcraider, rcraider, heli, RCRAIDER, RCRAIDE, null, ignore, 1, 0, 0, -1, 0.25, 0.25, -1 466, glendale, glendale, car, GLENDALE, GLENDAL, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 467, oceanic, oceanic, car, OCEANIC, OCEANIC, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 468, sanchez, sanchez, bike, DIRTBIKE, SANCHEZ, biked, motorbike, 5, 0, 0, 23, 0.68, 0.62, -1 469, sparrow, sparrow, heli, SPARROW, SPARROW, null, ignore, 10, 0, 0, -1, 0.7, 0.7, -1 470, patriot, patriot, car, PATRIOT, PATRIOT, null, ignore, 2, 0, 0, -1, 0.894, 0.894, -1 471, quad, quad, quad, QUADBIKE, QUAD, quad, normal, 4, 0, 0, -1, 0.6, 0.6, -1 472, coastg, coastg, boat, COASTGRD, COASTG, null, ignore, 5, 0, 3012 473, dinghy, dinghy, boat, DINGHY, DINGHY, null, workerboat, 7, 0, 0 474, hermes, hermes, car, HERMES, HERMES, null, richfamily, 4, 0, 0, -1, 0.7, 0.7, 0 475, sabre, sabre, car, SABRE, SABRE, null, normal, 10, 0, 2ff0, -1, 0.7, 0.7, 0 476, rustler, rustler, plane, RUSTLER, RUSTLER, rustler,ignore, 10, 0, 0, -1, 0.6, 0.3, -1 477, zr350, zr350, car, ZR350, ZR350, null, richfamily, 10, 0, 0, -1, 0.76, 0.76, 0 478, walton, walton, car, WALTON, WALTON, null, worker, 6, 0, 0, -1, 0.7, 0.7, 0 479, regina, regina, car, REGINA, REGINA, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 480, comet, comet, car, COMET, COMET, null, executive, 5, 0, 2ff0, -1, 0.7, 0.7, 0 481, bmx, bmx, bmx, BMX, BMX, bmx, bicycle, 5, 0, 0, 23, 0.54, 0.54, -1 482, burrito, burrito, car, BURRITO, BURRITO, van, normal, 10, 0, 0, -1, 0.7, 0.7, -1 483, camper, camper, car, CAMPER, CAMPER, van, normal, 4, 0, 0, -1, 0.66, 0.66, -1 484, marquis, marquis, boat, MARQUIS, MARQUIS, null, workerboat, 10, 0, 0 485, baggage, baggage, car, BAGGAGE, BAGGAGE, null, normal, 4, 0, 0, -1, 0.6, 0.6, -1 486, dozer, dozer, car, DOZER, DOZER, dozer, ignore, 4, 0, 0, -1, 1.5, 1.5, -1 487, maverick, maverick, heli, MAVERICK, MAVERIC, null, ignore, 10, 0, 0, -1, 0.7, 0.7, -1 488, vcnmav, vcnmav, heli, COASTMAV, SANMAV, null, ignore, 6, 0, 0, -1, 0.7, 0.7, -1 489, rancher, rancher, car, RANCHER, RANCHER, null, normal, 10, 0, 0, -1, 0.9, 0.9, 0 490, fbiranch, fbiranch, car, FBIRANCH, FBIRANC, null, ignore, 3, 0, 0, -1, 0.92, 0.92, -1 491, virgo, virgo, car, VIRGO, VIRGO, null, normal, 10, 0, 0, -1, 0.65, 0.65, 0 492, greenwoo, greenwoo, car, GREENWOO, GREENWO, null, poorfamily, 10, 0, 0, -1, 0.7, 0.7, 0 493, jetmax, jetmax, boat, CUPBOAT, JETMAX, null, ignore, 8, 0, 0 494, hotring, hotring, car, HOTRING, HOTRING, null, ignore, 1, 0, 0, -1, 0.82, 0.82, -1 495, sandking, sandking, car, SANDKING, SANDKIN, null, ignore, 4, 0, 0, -1, 0.972, 0.972, -1 496, blistac, blistac, car, BLISTAC, BLISTAC, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 497, polmav, polmav, heli, POLMAV, POLMAV, null, ignore, 10, 0, 0, -1, 0.7, 0.7, -1 498, boxville, boxville, car, BOXVILLE, BOXVILL, van, worker, 10, 0, 0, -1, 0.76, 0.76, -1 499, benson, benson, car, BENSON, BENSON, null, worker, 10, 0, 0, -1, 0.8, 0.8, -1 500, mesa, mesa, car, MESA, MESAA, null, normal, 8, 0, 0, -1, 0.8, 0.8, 0 501, rcgoblin, rcgoblin, heli, RCGOBLIN, RCGOBLI, null, ignore, 1, 0, 0, -1, 0.25, 0.25, -1 502, hotrina, hotrina, car, HOTRING, HOTRINA, null, ignore, 1, 0, 4fff, -1, 0.82, 0.82, -1 503, hotrinb, hotrinb, car, HOTRING, HOTRINB, null, ignore, 1, 0, 4fff, -1, 0.82, 0.82, -1 504, bloodra, bloodra, car, BLOODRA, BLOODRA, BF_injection, ignore, 1, 0, 4fff, -1, 0.7, 0.7, -1 505, rnchlure, rnchlure, car, RANCHER, RANCHER, null, normal, 10, 0, 0, -1, 0.9, 0.9, -1 506, supergt, supergt, car, SUPERGT, SUPERGT, null, executive, 5, 0, 0, -1, 0.7, 0.7, 0 507, elegant, elegant, car, ELEGANT, ELEGANT, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 508, journey, journey, car, JOURNEY, JOURNEY, null, worker, 4, 0, 0, -1, 0.8, 0.8, -1 509, bike, bike, bmx, CHOPPERB, BIKE, choppa, bicycle, 7, 0, 0, 23, 0.526, 0.612, -1 510, mtbike, mtbike, bmx, MTB, MTBIKE, mtb, bicycle, 7, 0, 0, 23, 0.68, 0.68, -1 511, beagle, beagle, plane, BEAGLE, BEAGLE, van, ignore, 10, 0, 0, -1, 0.52, 0.52, -1 512, cropdust, cropdust, plane, CROPDUST, CROPDST, rustler, ignore, 6, 0, 0, -1, 0.7, 0.3, -1 513, stunt, stunt, plane, STUNT, STUNT, rustler, ignore, 6, 0, 0, -1, 0.48, 0.48, -1 514, petro, petro, car, PETROL, PETROL, truck, worker, 5, 0, 0, -1, 1.106, 1.106, -1 515, rdtrain, rdtrain, car, RDTRAIN, RDTRAIN, truck, worker, 5, 0, 0, -1, 1.18, 1.18, -1 516, nebula, nebula, car, NEBULA, NEBULA, null, poorfamily, 10, 0, 0, -1, 0.75, 0.75, 0 517, majestic, majestic, car, MAJESTIC, MAJESTC, null, poorfamily, 10, 0, 0, -1, 0.75, 0.75, 0 518, buccanee, buccanee, car, BUCCANEE, BUCCANE, null, normal, 10, 0, 0, -1, 0.66, 0.66, 0 519, shamal, shamal, plane, SHAMAL, SHAMAL, shamal, ignore, 5, 0, 0, -1, 0.62, 0.62, -1 520, hydra, hydra, plane, HYDRA, HYDRA, rustler, ignore, 4, 0, 0, -1, 0.7, 0.3, -1 521, fcr900, fcr900, bike, FCR900, FCR900, bikes, motorbike, 6, 0, 3f341210, 16, 0.68, 0.68, -1 522, nrg500, nrg500, bike, NRG500, NRG500, bikes, motorbike, 10, 0, 1f341210, 16, 0.68, 0.68, -1 523, copbike, copbike, bike, HPV1000, HPV1000, bikes, ignore, 10, 0, 0, 16, 0.68, 0.68, -1 524, cement, cement, car, CEMENT, CEMENT, null, worker, 4, 0, 0, -1, 1.12, 1, -1 525, towtruck, towtruck, car, TOWTRUCK, TOWTRUK, van, worker, 5, 0, 0, -1, 0.92, 0.92, -1 526, fortune, fortune, car, FORTUNE, FORTUNE, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 527, cadrona, cadrona, car, CADRONA, CADRONA, null, poorfamily, 10, 0, 0, -1, 0.7, 0.7, 0 528, fbitruck, fbitruck, car, FBITRUCK, FBITRUK, van, big, 4, 0, 0, -1, 0.85, 0.85, -1 529, willard, willard, car, WILLARD, WILLARD, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 530, forklift, forklift, car, FORKLIFT, FORKLFT, null, worker, 1, 0, 0, -1, 0.45, 0.45, -1 531, tractor, tractor, car, TRACTOR, TRACTOR, null, normal, 5, 0, 0, -1, 0.68, 1.3, -1 532, combine, combine, car, COMBINE, COMBINE, truck, ignore, 5, 0, 0, -1, 0.588, 1, -1 533, feltzer, feltzer, car, FELTZER, FELTZER, null, executive, 10, 0, 0, -1, 0.7, 0.7, 0 534, remingtn, remingtn, car, REMINGTN, REMING, null, executive, 10, 0, 0, -1, 0.7, 0.7, 2 535, slamvan, slamvan, car, SLAMVAN, SLAMVAN, null, richfamily, 5, 0, 1f10, -1, 0.74, 0.74, 2 536, blade, blade, car, BLADE, BLADE, null, executive, 7, 0, 0, -1, 0.7, 0.7, 2 537, freight, freight, train, FREIGHT, FREIGHT, truck, ignore, 10, 0, 0, -1, 1.06, 1.06, -1 538, streak, streak, train, STREAK, STREAK, truck, ignore, 10, 0, 0, -1, 1.06, 1.06, -1 539, vortex, vortex, plane, VORTEX, VORTEX, vortex, ignore, 4, 0, 0, -1, 0.7, 0.7, -1 540, vincent, vincent, car, VINCENT, VINCENT, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 541, bullet, bullet, car, BULLET, BULLET, null, executive, 4, 0, 0, -1, 0.7, 0.75, 0 542, clover, clover, car, CLOVER, CLOVER, null, poorfamily, 10, 0, 0, -1, 0.74, 0.74, 0 543, sadler, sadler, car, SADLER, SADLER, null, normal, 10, 0, 0, -1, 0.7, 0.7, -1 544, firela, firela, car, FIRETRUK, FIRELA, truck, ignore, 10, 0, 0, -1, 1.0, 1.0, -1 545, hustler, hustler, car, HUSTLER, HUSTLER, null, normal, 4, 0, 0, -1, 0.7, 0.7, 0 546, intruder, intruder, car, INTRUDER, INTRUDR, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 547, primo, primo, car, PRIMO, PRIMO, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 548, cargobob, cargobob, heli, CARGOBOB, CARGOBB, null, ignore, 5, 0, 0, -1, 0.74, 0.74, -1 549, tampa, tampa, car, TAMPA, TAMPA, null, poorfamily, 10, 0, 0, -1, 0.684, 0.684, 0 550, sunrise, sunrise, car, SUNRISE, SUNRISE, null, normal, 10, 0, 0, -1, 0.76, 0.76, 0 551, merit, merit, car, MERIT, MERIT, null, richfamily, 10, 0, 0, -1, 0.75, 0.75, 0 552, utility, utility, car, UTILITY, UTILITY, van, worker, 5, 0, 0, -1, 0.84, 0.84, -1 553, nevada, nevada, plane, NEVADA, NEVADA, nevada, ignore, 4, 0, 0, -1, 0.85, 0.4, -1 554, yosemite, yosemite, car, YOSEMITE, YOSEMIT, null, normal, 10, 0, 0, -1, 0.84, 0.84, -1 555, windsor, windsor, car, WINDSOR, WINDSOR, null, executive, 4, 0, 0, -1, 0.7, 0.7, 0 556, monstera, monstera, mtruck, MTRUCK_A, MONSTA, truck, ignore, 1, 0, 0, -1, 1.5, 1.5, -1 557, monsterb, monsterb, mtruck, MTRUCK_B, MONSTB, truck, ignore, 1, 0, 0, -1, 1.5, 1.5, -1 558, uranus, uranus, car, URANUS, URANUS, null, richfamily, 7, 0, 0, -1, 0.7, 0.7, 1 559, jester, jester, car, JESTER, JESTER, null, richfamily, 7, 0, 0, -1, 0.7, 0.7, 1 560, sultan, sultan, car, SULTAN, SULTAN, null, richfamily, 7, 0, 0, -1, 0.7, 0.7, 1 561, stratum, stratum, car, STRATUM, STRATUM, null, richfamily, 7, 0, 0, -1, 0.7, 0.7, 1 562, elegy, elegy, car, ELEGY, ELEGY, null, richfamily, 7, 0, 0, -1, 0.68, 0.68, 1 563, raindanc, raindanc, heli, RAINDANC, RAINDNC, null, ignore, 7, 0, 0, -1, 0.64, 0.64, -1 564, rctiger, rctiger, car, RCTIGER, RCTIGER, null, ignore, 1, 0, 0, -1, 0.25, 0.25, -1 565, flash, flash, car, FLASH, FLASH, null, richfamily, 7, 0, 0, -1, 0.64, 0.64, 1 566, tahoma, tahoma, car, TAHOMA, TAHOMA, null, richfamily, 10, 0, 0, -1, 0.7, 0.7, 0 567, savanna, savanna, car, SAVANNA, SAVANNA, null, poorfamily, 7, 0, 2ff0, -1, 0.7, 0.7, 2 568, bandito, bandito, car, BANDITO, BANDITO, null, ignore, 4, 0, 0, -1, 0.55, 0.7, -1 569, freiflat, freiflat, train, FREIFLAT, FRFLAT, null, ignore, 10, 0, 0, -1, 1.06, 1.06, -1 570, streakc, streakc, train, CSTREAK, STREAKC, coach, ignore, 10, 0, 0, -1, 1.06, 1.06, -1 571, kart, kart, car, KART, KART, KART, ignore, 4, 0, 0, -1, 0.26, 0.26, -1 572, mower, mower, car, MOWER, MOWER, null, ignore, 4, 0, 0, -1, 0.48, 0.56, -1 573, duneride, duneride, mtruck, DUNE, DUNE, truck, ignore, 4, 0, 0, -1, 1.14, 1.14, -1 574, sweeper, sweeper, car, SWEEPER, SWEEPER, null, worker, 4, 0, 0, -1, 0.5, 0.5, -1 575, broadway, broadway, car, BROADWAY, BROADWY, null, poorfamily, 7, 0, 2ff0, -1, 0.7, 0.7, 2 576, tornado, tornado, car, TORNADO, TORNADO, null, poorfamily, 7, 0, 2ff0, -1, 0.7, 0.7, 2 577, at400, at400, plane, AT400, AT400, coach, ignore, 10, 0, 0, -1, 1.12, 1.12, -1 578, dft30, dft30, car, DFT30, DFT30, truck, worker, 10, 0, 4fff, -1, 1, 1, -1 579, huntley, huntley, car, HUNTLEY, HUNTLEY, null, richfamily, 6, 7, 0, -1, 0.90, 0.90, 0 580, stafford, stafford, car, STAFFORD, STAFFRD, null, normal, 4, 0, 0, -1, 0.78, 0.78, 0 581, bf400, bf400, bike, BF400, BF400, bikes, motorbike, 10, 0, 3f341210, 16, 0.68, 0.68, -1 582, newsvan, newsvan, car, NEWSVAN, NEWSVAN, van, normal, 4, 0, 0, -1, 0.77, 0.77, -1 583, tug, tug, car, TUG, TUG, null, normal, 4, 0, 0, -1, 0.66, 0.75, -1 584, petrotr, petrotr, trailer, PETROTR, PETROTR, null, ignore, 6, 0, 0, -1, 1.12, 1.12, -1 585, emperor emperor, car, EMPEROR, EMPEROR, null, normal, 10, 0, 0, -1, 0.74, 0.74, 0 586, wayfarer wayfarer, bike, WAYFARER, WAYFARE, wayfarer,motorbike, 6, 0, 0, 23, 0.654, 0.654, -1 587, euros, euros, car, EUROS, EUROS, null, richfamily, 10, 0, 0, -1, 0.7, 0.7, 0 588, hotdog, hotdog, car, HOTDOG, HOTDOG, van, worker, 4, 0, 0, -1, 0.86, 0.86, -1 589, club, club, car, CLUB, CLUB, null, normal, 8, 0, 0, -1, 0.74, 0.74, 0 590, freibox, freibox, train, FREIFLAT, FRBOX, null, ignore, 10, 0, 0, -1, 1.06, 1.06, -1 591, artict3, artict3, trailer, ARTICT3, ARTICT3, null, ignore, 6, 0, 0, -1, 1.1, 1.1, -1 592, androm, androm, plane, ANDROM, ANDROM, null, ignore, 4, 0, 0, -1, 0.95, 0.95, -1 593, dodo dodo, plane, DODO, DODO, van, ignore, 10, 0, 0, -1, 0.56, 0.56, -1 594, rccam, rccam, car, RCCAM, RCCAM, null, ignore, 1, 0, 0, -1, 0.25, 0.25, -1 595, launch, launch, boat, LAUNCH, LAUNCH, null, leisureboat, 10, 0, 0 596, copcarla, copcarla, car, POLICE_LA, POLICAR, null, ignore, 10, 0, 0, -1, 0.7, 0.7, -1 597, copcarsf, copcarsf, car, POLICE_SF, POLICAR, null, ignore, 10, 0, 0, -1, 0.7, 0.7, -1 598, copcarvg, copcarvg, car, POLICE_VG, POLICAR, null, ignore, 10, 0, 0, -1, 0.7, 0.7, -1 599, copcarru, copcarru, car, POLRANGER, RANGER, null, ignore, 10, 0, 0, -1, 0.95, 0.95, -1 600, picador, picador, car, PICADOR, PICADOR, null, normal, 10, 0, 0, -1, 0.7, 0.7, 0 601, swatvan, swatvan, car, SWATVAN, SWATVAN, van, big, 4, 0, 0, -1, 1.366, 1.366, -1 602, alpha, alpha, car, ALPHA, ALPHA, null, executive, 10, 0, 0, -1, 0.7, 0.7, 0 603, phoenix, phoenix, car, PHOENIX, PHOENIX, null, normal, 7, 0, 0, -1, 0.7, 0.7, 0 604, glenshit, glenshit, car, GLENDALE, GLENSHI, null, normal, 5, 0, 0, -1, 0.7, 0.7, -1 605, sadlshit, sadlshit, car, SADLER, SADLSHI, null, normal, 10, 0, 0, -1, 0.7, 0.7, -1 606, bagboxa, bagboxa, trailer, BAGBOXA, BAGBOXA, null, ignore, 4, 0, 0, -1, 0.6, 0.6, -1 607, bagboxb, bagboxb, trailer, BAGBOXB, BAGBOXB, null, ignore, 4, 0, 0, -1, 0.6, 0.6, -1 608, tugstair, tugstair, trailer, STAIRS, TUGSTAI, null, ignore, 4, 0, 0, -1, 0.6, 0.6, -1 609, boxburg, boxburg, car, BOXBURG, BOXBURG, van, worker, 10, 0, 0, -1, 0.76, 0.76, -1 610, farmtr1, farmtr1, trailer, FARM_TR1, FARMTR1, null, ignore, 4, 0, 0, -1, 0.32, 0.32, -1 611, utiltr1, utiltr1, trailer, UTIL_TR1, UTILTR1, null, ignore, 4, 0, 0, -1, 0.68, 0.68, -1 end
  9. Or OnClientPlayerHitByWaterCannon if you want to detect if for the player.
  10. I saw it. I gave him the most efficient way. It's upto him to decide further.
  11. You can ask the author of the resource for a workaround.
  12. I have improved the following code and it should work properly. local root = getRootElement() local connectionHandle; local pldata = -- Initializing the pldata table { -- Instead of putting them on a singluar cell, assign it in each id following your data name in encased squared brackets and assigning it to the default value. ["id"] = "0", ["name"] = "N/A", ["age"] = "0", ["profession"] = "N/A", ["language"] = "N/A" } addEventHandler("onPlayerJoin", root, function() spawnPlayer(source, 1959.55, -1714.46, 10) fadeCamera(source, true) setCameraTarget(source, source) end ) addEventHandler("onResourceStart", root, function() connectionHandle = dbConnect("mysql", "dbname=testgm;host=localhost", "root", "") local query = dbQuery(connectionHandle, "SELECT * FROM `user` WHERE `id` = 1") local result, numrows, errormsg = dbPoll(query, -1) dbFree(query) if numrows > 0 then -- Now this is what we are doing. For each values on the keys of result table execute the following code. for k, v in pairs(result) do for a, b in pairs(v) do -- And this for each data name and data value for e.j. name | N/A pldata[a] = b -- Then setting it up. It can be pldata["name"] = "Another name" end end end end )
×
×
  • Create New...