Reezmi Posted July 24, 2012 Share Posted July 24, 2012 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
qaisjp Posted July 24, 2012 Share Posted July 24, 2012 (edited) 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 July 25, 2012 by Guest Link to comment
Anderl Posted July 24, 2012 Share Posted July 24, 2012 (edited) 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 July 25, 2012 by Guest Link to comment
Jaysds1 Posted July 25, 2012 Share Posted July 25, 2012 (edited) He's showing you the error's in your code/script. Edited July 26, 2012 by Guest Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now