iiv03 Posted October 15, 2018 Share Posted October 15, 2018 I made a script mode is about if a person chooses or selects the skin car infernus he gives him but I do not want him if he chooses to give to others I want to give to himself alone. i know its a source but how i use please. Infernuspanel = { button = {}, window = {}, label = {} } --320, 106, 642, 491 function panelwindow () local sx, sy = guiGetScreenSize( ) Infernuspanel.window[1]= guiCreateWindow(sx*( 320/1280 ), sy*( 106/720 ), sx*( 642/1280 ), sy*( 491/720 ), "", false) guiWindowSetSizable(Infernuspanel.window[1], false) guiSetAlpha(Infernuspanel.window[1], 0.00) Infernuspanel.button[1] = guiCreateButton(sx*( 60/1280 ), sy*( 128/720 ), sx*( 99/1280 ), sy*( 40/720 ), "", false, Infernuspanel.window[1]) guiSetAlpha(Infernuspanel.button[1], 0.00) Infernuspanel.button[2] = guiCreateButton(sx*( 60/1280 ), sy*( 289/720 ), sx*( 99/1280 ), sy*( 40/720 ), "", false, Infernuspanel.window[1]) guiSetAlpha(Infernuspanel.button[2], 0.00) Infernuspanel.button[3] = guiCreateButton(sx*( 60/1280 ), sy*( 441/720 ), sx*( 99/1280 ), sy*( 40/720 ), "", false, Infernuspanel.window[1]) guiSetAlpha(Infernuspanel.button[3], 0.00) Infernuspanel.button[6] = guiCreateButton(sx*( 470/1280 ), sy*( 441/720 ), sx*( 99/1280 ), sy*( 40/720 ), "", false, Infernuspanel.window[1]) guiSetAlpha(Infernuspanel.button[6], 0.00) Infernuspanel.button[5] = guiCreateButton(sx*( 470/1280 ), sy*( 289/720 ), sx*( 99/1280 ), sy*( 40/720 ), "", false, Infernuspanel.window[1]) guiSetAlpha(Infernuspanel.button[5], 0.00) Infernuspanel.button[4] = guiCreateButton(sx*( 470/1280 ), sy*( 128/720 ), sx*( 99/1280 ), sy*( 40/720 ), "", false, Infernuspanel.window[1]) guiSetAlpha(Infernuspanel.button[4], 0.00) addEventHandler("onClientGUIClick", Infernuspanel.button[1], infi1, false) addEventHandler("onClientGUIClick", Infernuspanel.button[6], infi2, false) addEventHandler("onClientGUIClick", Infernuspanel.button[3], infi3, false) addEventHandler("onClientGUIClick", Infernuspanel.button[4], infi4, false) addEventHandler("onClientGUIClick", Infernuspanel.button[5], infi5, false) addEventHandler("onClientGUIClick", Infernuspanel.button[2], infi6, false) end -- Show Window local value = false function visible () if value == false then panelwindow() value = true showCursor(true) elseif value == true then showCursor(false) guiSetVisible(Infernuspanel.window[1],false) value = false end end bindKey("F3","down", visible) -- Load Infernus local msg_red, msg_green, msg_blue = 0, 255, 0 function infi1 () InfiTexture = engineLoadTXD ( "InfiMod/infernus1.txd" ) engineImportTXD ( InfiTexture, 411 ) InfiModel = engineLoadDFF ( "InfiMod/infernus1.dff", 411 ) engineReplaceModel ( InfiModel, 411 ) outputChatBox("Infernus1 Yüklendi.", theplayer, msg_red, msg_green, msg_blue, true) end function infi2 () InfiTexture = engineLoadTXD ( "InfiMod/infernus2.txd" ) engineImportTXD ( InfiTexture, 411 ) InfiModel = engineLoadDFF ( "InfiMod/infernus2.dff", 411 ) engineReplaceModel ( InfiModel, 411 ) outputChatBox("Infernus2 Yüklendi.", theplayer, msg_red, msg_green, msg_blue, true) engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac) end function infi3 () InfiTexture = engineLoadTXD ( "InfiMod/infernus3.txd" ) engineImportTXD ( InfiTexture, 411 ) InfiModel = engineLoadDFF ( "InfiMod/infernus3.dff", 411 ) engineReplaceModel ( InfiModel, 411 ) outputChatBox("Infernus3 Yüklendi.", theplayer, msg_red, msg_green, msg_blue, true) end function infi4 () InfiTexture = engineLoadTXD ( "InfiMod/infernus4.txd" ) engineImportTXD ( InfiTexture, 411 ) InfiModel = engineLoadDFF ( "InfiMod/infernus4.dff", 411 ) engineReplaceModel ( InfiModel, 411 ) outputChatBox("Infernus4 Yüklendi.", theplayer, msg_red, msg_green, msg_blue, true) end function infi5 () InfiTexture = engineLoadTXD ( "InfiMod/infernus5.txd" ) engineImportTXD ( InfiTexture, 411 ) InfiModel = engineLoadDFF ( "InfiMod/infernus5.dff", 411 ) engineReplaceModel ( InfiModel, 411 ) outputChatBox("Infernus5 Yüklendi.", theplayer, msg_red, msg_green, msg_blue, true) end function infi6 () InfiTexture = engineLoadTXD ( "InfiMod/infernus6.txd" ) engineImportTXD ( InfiTexture, 411 ) InfiModel = engineLoadDFF ( "InfiMod/infernus6.dff", 411 ) engineReplaceModel ( InfiModel, 411 ) outputChatBox("Infernus5 Yüklendi.", theplayer, msg_red, msg_green, msg_blue, true) end Link to comment
Z4Zy Posted October 15, 2018 Share Posted October 15, 2018 I think your problem is... , when a GUI button was pressed by me, Infernus car should replaced only to me. But above code will replace it to all players. Is it your problem ? or what ? Link to comment
MIKI785 Posted October 15, 2018 Share Posted October 15, 2018 engine functions are 'global'. You cannot replace a model for a single element. You may only replace the texture using shaders. Link to comment
iiv03 Posted October 15, 2018 Author Share Posted October 15, 2018 40 minutes ago, DeadthStrock said: I think your problem is... , when a GUI button was pressed by me, Infernus car should replaced only to me. But above code will replace it to all players. Is it your problem ? or what ? Yeah plz. Help Link to comment
Dimos7 Posted October 15, 2018 Share Posted October 15, 2018 also in client side not need player gose to client direct Link to comment
VenomOG Posted October 19, 2018 Share Posted October 19, 2018 addEventHandler("onClientGUIClick", Infernuspanel.button[1], infi1) addEventHandler("onClientGUIClick", Infernuspanel.button[6], infi2) addEventHandler("onClientGUIClick", Infernuspanel.button[3], infi3) addEventHandler("onClientGUIClick", Infernuspanel.button[4], infi4) addEventHandler("onClientGUIClick", Infernuspanel.button[5], infi5) addEventHandler("onClientGUIClick", Infernuspanel.button[2], infi6) try 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