Jump to content

botshara

Members
  • Content Count

    83
  • Joined

  • Last visited

Everything posted by botshara

  1. thanks, another problem how to not equal on line 5 ? addEventHandler( "onVehicleStartEnter", root, function( player, seat ) local id = getElementModel ( source ) if seat == 0 and id == 596 and exports.factions:isPlayerInFaction( player, ~=1 ) then outputChatBox( "(( This is police car, you cant drive with it!. . ))", player, 255, 0, 0 ) cancelEvent( ) end end ) and exports.factions:isPlayerInFaction( player, ~=1 )
  2. Where is the problem ? I dont get message this police car.... and i can eneter in car addEventHandler( "onVehicleStartEnter", root, function( player, seat ) local id = getElementModel ( theVehicle ) if seat == 0 and id == 596 then outputChatBox( "(( This is police car, you cant drive with it!. ))", player, 255, 0, 0 ) cancelEvent( ) end end )
  3. botshara

    Moveobject

    yeah it work, but one door opens later and dont close
  4. botshara

    Moveobject

    The same problem, doors open but dont go back. when i write again /pddd doors close and then open, but dont go back I FIXED IT, I CHANGED setTimer(bacdoors, 5000, 1) with setTimer(createdoors, 5000, 1) but it doesnt look rp
  5. botshara

    Moveobject

    I have a small problem, i created 2 doors and i want them open in one time and after 5 sec moveback. Now i have a problem doors dont open in one time and doors dont moveback after 5 sec policedoors1 = createObject ( 1535, 246.36, 72.62, 1002.64, 0, 0, 0 ) setElementInterior ( policedoors1, 6) setElementDimension ( policedoors1, 9) policedoors2 = createObject ( 1535, 244.84, 72.61, 1002.64, 0, 0, 0 ) setElementInterior ( policedoors2, 6) setElementDimension ( policedoors2, 9) function doors1police() moveObject ( policedoors1, 3000, 1535, 246.36, 72.62, 1002.64, 0, 0, 0 ) set
  6. nop, it is correct if not number insert nothing. something here is problem to close while or if's if not number then number = exports.sql:query_insertid( "INSERT INTO phones VALUES ()" ); else -- we create a row for the one that didn't exist yet but where we have the number for. while true do attempts = attempts + 1 number = math.random(311111, attempts < 20 and 899999 or 8999999) -- no current phones OR the new phone number is the new max. end return createPhone( )
  7. The error is at line 4 'end' expected -- we need to export a function to generate a new (unused) phone number, really function createPhone( number ) if not number then number = exports.sql:query_insertid( "INSERT INTO phones VALUES ()" ); else -- we create a row for the one that didn't exist yet but where we have the number for. while true do attempts = attempts + 1 number = math.random(311111, attempts < 20 and 899999 or 8999999) -- no current phones OR the new phone number is the new max.
  8. botshara

    math random

    Hello, i need make this scipt to work like, i have 2 routes and need make to server choose in random routes. I tryed but didnt worked server local vehicles = get( "vehicles" ) or { "Bus" } -- load the civilian vehicles that'll automatically trigger the delivery mission if being entered local max_earnings = tonumber( get( "earnings" ) ) or 7 local delay = tonumber( get( "delay" ) ) or 5 -- put it in a for us better format local vehicles2 = { } for key, value in ipairs( vehicles ) do local model = getVehicleModelFromName( value ) if model then vehicles2[ model ]
×
×
  • Create New...