Jump to content

calling a local


Reezmi

Recommended Posts

Is there a way to call a local to other script? Like from server to client. I need this because these functions arent usable in client-side script.

Server side -->>

deliveryvehicle = createVehicle (veh, 2188.0070800781,1435.4604492188,10.524965286255) 
setTimer ( warpPedIntoVehicle, 1000, 1, source, deliveryvehicle ) 

Im talking about deliveryvehicle, is there a way to call these to client?

Client side -->>

destroyElement(deliveryvehicle) 

I'v been trying to figure this out for hours :|

Link to comment

destroyElement can be used server side (and client side, so try it server sided!!!)

From server -> client:

  
-- server 
function CreateStupidWindow(p) 
    local name = getPlayerName(p) 
    triggerClientEvent('StupidWindowPlease', root, name) 
end 
addCommandHandler('stupe', CreateStupidWindow) 
  

  
--client 
addEvent('StupidWindowPlease', true) 
function StupidWindow(stupidname) 
    guiCreateWindow(0,0,1,1,stupidname or '', true) 
end 
addEventHandler('StupidWindowPlease', root, StupidWindow) 
  

This will make a stupid window for everyone when you type /stupe with the title of the window as the player who typed the command.

Edited by Guest
Link to comment
destroyElement can be used server side (and client side, so try it server sided!!!)

From server -> client:

  
-- server 
function CreateStupidWindow() 
    local name = getPlayerName(source) 
    triggerClientEvent('StupidWindowPlease', root, name) 
end 
addCommandHandler('stupe', CreateStupidWindow) 
  

  
--client 
addEvent('StupidWindowPlease', true) 
function StupidWindow(stupidname) 
    guiCreateWindow(0,0,1,1,stupidname or '' true) 
end 
addEventHandler('StupidWindowPlease', root, StupidWindow) 
  

This will make a stupid window for everyone when you type /stupe with the title of the window as the player who typed the command.

function CreateStupidWindow(pPlayer) 

local name = getPlayerName(pPlayer) 

guiCreateWindow(0,0,1,1,stupidname or '', true) 

Edited by Guest
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...