Jump to content

FeatCode

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by FeatCode

  1. wLicense, licenseList, bAcceptLicense, bCancel = nil local Johnson = createPed(71, 251.2587890625, 69.673828125, 1003.640625) setPedRotation(Johnson,92.558471679688) setElementDimension(Johnson, 1) setElementInterior(Johnson, 6) setElementData( Johnson, "talk", 1 ) setElementData( Johnson, "name", "Officer Johnson" ) setElementFrozen( Johnson, true) local localPlayer = getLocalPlayer() function showLicenseWindow( ) triggerServerEvent("onLicenseServer", getLocalPlayer()) local vehiclelicense = getElementData(getLocalPlayer(), "license.car") local gunlicense = getElementData(getLocalPlayer(), "license.gun") local width, height = 300, 400 local scrWidth, scrHeight = guiGetScreenSize() local x = scrWidth/2 - (width/2) local y = scrHeight/2 - (height/2) wLicense= guiCreateWindow(x, y, width, height, "Los Santos Licensing Department", false) licenseList = guiCreateGridList(0.05, 0.05, 0.9, 0.8, true, wLicense) local column = guiGridListAddColumn(licenseList, "License", 0.7) local column2 = guiGridListAddColumn(licenseList, "Cost", 0.2) if (vehiclelicense~=1) then local row = guiGridListAddRow(licenseList) guiGridListSetItemText(licenseList, row, column, "Car License", false, false) guiGridListSetItemText(licenseList, row, column2, "450", true, false) end if (gunlicense~=1) then local row2 = guiGridListAddRow(licenseList) guiGridListSetItemText(licenseList, row2, column, "Weapon License", false, false) guiGridListSetItemText(licenseList, row2, column2, "4500", true, false) end bAcceptLicense = guiCreateButton(0.05, 0.85, 0.45, 0.1, "Buy License", true, wLicense) bCancel = guiCreateButton(0.5, 0.85, 0.45, 0.1, "Cancel", true, wLicense) showCursor(true) addEventHandler("onClientGUIClick", bAcceptLicense, acceptLicense) addEventHandler("onClientGUIClick", bCancel, cancelLicense) end addEvent("onLicense", true) addEventHandler("onLicense", getRootElement(), showLicenseWindow) addEventHandler("onClientClick", getRootElement(), showLicenseWindow) Like this? If yes, it's not working cause it's just spaming triggerServerEvent
  2. Could you tell me how to do it?
  3. Can you tell me the way to change my wheel color as the 3rd color to my vehicles?
  4. Hey i want to ask where do i place the onClientClicked event for ped if my script is like this local Johnson = createPed(71, 251.2587890625, 69.673828125, 1003.640625) setPedRotation(Johnson,92.558471679688) setElementDimension(Johnson, 1) setElementInterior(Johnson, 6) setElementData( Johnson, "talk", 1 ) setElementData( Johnson, "name", "Officer Johnson" ) setElementFrozen( Johnson, true) local localPlayer = getLocalPlayer() function showLicenseWindow( ) triggerServerEvent("onLicenseServer", getLocalPlayer()) local vehiclelicense = getElementData(getLocalPlayer(), "license.car") local gunlicense = getElementData(getLocalPlayer(), "license.gun") local width, height = 300, 400 local scrWidth, scrHeight = guiGetScreenSize() local x = scrWidth/2 - (width/2) local y = scrHeight/2 - (height/2) wLicense= guiCreateWindow(x, y, width, height, "Los Santos Licensing Department", false) licenseList = guiCreateGridList(0.05, 0.05, 0.9, 0.8, true, wLicense) local column = guiGridListAddColumn(licenseList, "License", 0.7) local column2 = guiGridListAddColumn(licenseList, "Cost", 0.2) if (vehiclelicense~=1) then local row = guiGridListAddRow(licenseList) guiGridListSetItemText(licenseList, row, column, "Car License", false, false) guiGridListSetItemText(licenseList, row, column2, "450", true, false) end if (gunlicense~=1) then local row2 = guiGridListAddRow(licenseList) guiGridListSetItemText(licenseList, row2, column, "Weapon License", false, false) guiGridListSetItemText(licenseList, row2, column2, "4500", true, false) end bAcceptLicense = guiCreateButton(0.05, 0.85, 0.45, 0.1, "Buy License", true, wLicense) bCancel = guiCreateButton(0.5, 0.85, 0.45, 0.1, "Cancel", true, wLicense) showCursor(true) addEventHandler("onClientGUIClick", bAcceptLicense, acceptLicense) addEventHandler("onClientGUIClick", bCancel, cancelLicense) end addEvent("onLicense", true) addEventHandler("onLicense", getRootElement(), showLicenseWindow)
×
×
  • Create New...