Jump to content

Help PLs


orcun99

Recommended Posts

vehicle1 = createVehicle(487, 2798, 2548.900390625, 22.700000762939, 0, 0, 43.994750976563) -- This car can be  
toggleVehicleRespawn ( vehicle1 , true ) 
setVehicleRespawnDelay ( vehicle1 , 10000) -- Araç patladıktan kaç saniye sonra respawnlanacağını belirtir. 
setVehicleIdleRespawnDelay ( vehicle1 , 60000) -- 
vehicle = createVehicle ( modelID, x, y, z, rotX, rotY, rotZ ) 
state = setVehicleDoorState ( vehicle, 1, 1 ) 
setVehicleDamageProof ( vehicle, true )  -----car won't take damage (change it to false if you want to take damage) 
  
function lockPrivate( player, seat, jacked ) 
    if ( source == vehicle1 ) then 
        if ( seat ~= 0 ) then -- If the seat isn't '0' ( driver's seat ) 
            return -- Stop the function from executing. 
        end 
  
        local playerTeam = getPlayerTeam ( player ) 
        local oldTeamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) 
        if ( oldTeamName ~= "Admins" ) then 
            cancelEvent ( ) 
exports.ORCcommands:sendMessage("Buna Binmen İçin Admin Olman Gerek.", GetLocalPlayer, 255, 190, 0, source) 
        else 
exports.ORCcommands:sendMessage("Tekrar Hoşgeldin Admin Bey.", GetLocalPlayer, 255, 190, 0, source) 
        end 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate, GetLocalPlayer ) 
  
  

send a message to all players at the person who is sending it just got in the car How do I set?

exports.ORCcommands:sendMessage("Buna Binmen İçin Admin Olman Gerek.", GetLocalPlayer, 255, 190, 0, source)

I am english very bad

Post only want to get into the car to go to the people

message goes to all players now

Link to comment

Try This ,

vehicle1 = createVehicle(487, 2798, 2548.900390625, 22.700000762939, 0, 0, 43.994750976563) -- This car can be 
toggleVehicleRespawn ( vehicle1 , true ) 
setVehicleRespawnDelay ( vehicle1 , 10000) -- Araç patladıktan kaç saniye sonra respawnlanacağını belirtir. 
setVehicleIdleRespawnDelay ( vehicle1 , 60000) -- 
state = setVehicleDoorState ( vehicle1, 1, 1 ) 
setVehicleDamageProof ( vehicle1, true )  -----car won't take damage (change it to false if you want to take damage) 
  
function lockPrivate( seat ) 
           if isPedInVehicle (source, vehicle1 ) and ( seat ~= 0  ) and getPlayerTeam(getTeamName( source ) == 'Admins' ) then 
            cancelEvent ( ) 
            exports.ORCcommands:sendMessage("Buna Binmen İçin Admin Olman Gerek.", source, 255, 190, 0) 
        else 
        exports.ORCcommands:sendMessage("Tekrar Hoşgeldin Admin Bey.", source, 255, 190, 0) 
        end 
    end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate) 

Make sure it's ServerSide , on meta.xml

Link to comment

Here you go

vehicle1 = createVehicle(487, 2798, 2548.900390625, 22.700000762939, 0, 0, 43.994750976563) -- This car can be 
toggleVehicleRespawn ( vehicle1 , true ) 
setVehicleRespawnDelay ( vehicle1 , 10000) -- Araç patladıktan kaç saniye sonra respawnlanacağını belirtir. 
setVehicleIdleRespawnDelay ( vehicle1 , 60000) -- 
state = setVehicleDoorState ( vehicle1, 1, 1 ) 
setVehicleDamageProof ( vehicle1, true )  -----car won't take damage (change it to false if you want to take damage) 
  
function lockPrivate( player, seat ) 
if ( source == vehicle1 ) then 
    if ( seat ~= 0  ) and  ( getTeamName(getPlayerTeam( player )) == 'Admins' ) then 
            exports.ORCcommands:sendMessage("Buna Binmen İçin Admin Olman Gerek.", player, 255, 190, 0) 
        else 
            exports.ORCcommands:sendMessage("Tekrar Hoşgeldin Admin Bey.", player, 255, 190, 0) 
            cancelEvent ( ) 
        end 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate) 

Edited by Guest
Link to comment

This should work.

vehicle1 = createVehicle(487, 2798, 2548.900390625, 22.700000762939, 0, 0, 43.994750976563) -- This car can be 
toggleVehicleRespawn ( vehicle1 , true ) 
setVehicleRespawnDelay ( vehicle1 , 10000) -- Araç patladıktan kaç saniye sonra respawnlanacağını belirtir. 
setVehicleIdleRespawnDelay ( vehicle1 , 60000) -- 
state = setVehicleDoorState ( vehicle1, 1, 1 ) 
setVehicleDamageProof ( vehicle1, true )  -----car won't take damage (change it to false if you want to take damage) 
  
function lockPrivate( player, seat ) 
if ( source == vehicle1 ) then 
    if ( seat == 0  ) or ( seat == 1  ) or ( seat == 2  ) or ( seat == 3  ) or ( seat == 4  ) then 
        if ( getTeamName(getPlayerTeam( player )) == 'Admins' ) then 
            outputChatBox("Tekrar Hoşgeldin Admin Bey.", player, 255, 190, 0) 
        else 
            outputChatBox("Buna Binmen İçin Admin Olman Gerek.", player, 255, 190, 0) 
            cancelEvent ( ) 
            end 
        end 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...