Jump to content

[help]Drugs


TheSmart

Recommended Posts

hello guys!

i download this script from community but i want to edit it that only criminal can use it .so please can edit it?

Client

GUIEditor_Label = {} 
  
transWindow = guiCreateWindow(182,134,482,342,"Drug Transport Window",false) 
guiSetVisible(transWindow, false) 
destiLabel = guiCreateLabel(19,33,450,55,"Choose your destination",false,transWindow) 
lsButtonRadio = guiCreateRadioButton(21,104,437,19,"Los Santos, +2 Wanted Stars and 3000 if you made it",false,transWindow) 
lvButtonRadio = guiCreateRadioButton(20,149,437,19,"Las Venturas, +4 Wanted Stars and 6000 if you made it",false,transWindow) 
sfButtonRadio = guiCreateRadioButton(20,193,437,19,"San Fierro, +6 Wanted Stars and 10000 if you made it",false,transWindow) 
acceptButton = guiCreateButton(103,267,113,37,"Accept",false,transWindow) 
closeButton = guiCreateButton(241,266,108,37,"Close",false,transWindow) 
  
local jobmarker = createMarker ( 2448.68, -1976.63, 12.54, "cylinder", 2, 255, 0, 0, 255 ) 
createBlipAttachedTo (jobmarker, 40) 
function MarkerHit ( hitPlayer, matchingDimension ) 
    guiSetVisible(transWindow, true) 
    showCursor(true) 
    end 
addEventHandler ( "onClientMarkerHit", jobmarker, MarkerHit ) 
  
function closeChangeJobWindow() 
    if (source == closeButton) then 
        guiSetVisible(transWindow, false) 
        showCursor(false) 
    end 
end 
addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), closeChangeJobWindow) 
  
function lsjobcli() 
   if (source == acceptButton) then  
            if (guiRadioButtonGetSelected(lsButtonRadio)) then  
        triggerServerEvent ("givePlayerJobLS",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, lsjobcli, false ) 
  
function lvjobcli() 
   if (source == acceptButton) then  
            if (guiRadioButtonGetSelected(lvButtonRadio)) then  
        triggerServerEvent ("givePlayerJobLV",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, lvjobcli, false ) 
  
function sfjobcli() 
   if (source == acceptButton) then  
            if (guiRadioButtonGetSelected(sfButtonRadio)) then  
        triggerServerEvent ("givePlayerJobSF",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, sfjobcli, false ) 

Server

function lsjobser () 
     car = createVehicle (440, 2460.52, -2004.38, 13.54) 
     warpPedIntoVehicle(source, car) 
     markerLS = createMarker (1784.78, -1702.06, 12.50, "cylinder", 2, 255, 0, 0, 255) 
     blipLS = createBlipAttachedTo (markerLS, 40) 
end 
addEvent ("givePlayerJobLS", true) 
addEventHandler ("givePlayerJobLS", root, lsjobser) 
  
function moneyLS (attacker) 
     if (attacker) and (attacker ~= source) then 
     givePlayerMoney(attacker, 3000) 
     setPlayerWantedLevel(attacker, getPlayerWantedLevel(attacker)+2) 
     destroyElement(markerLS) 
     destroyElement(blipLS) 
     destroyElement(car) 
end 
end 
addEventHandler( "onMarkerHit", root, moneyLS ) 
  
function lvjobser () 
     carlv = createVehicle (440, 2460.52, -2004.38, 13.54) 
     warpPedIntoVehicle(source, carlv) 
     markerLV = createMarker (1074.43, 1292.71, 9.82, "cylinder", 2, 255, 0, 0, 255) 
     blipLV = createBlipAttachedTo (markerLV, 40) 
end 
addEvent ("givePlayerJobLV", true) 
addEventHandler ("givePlayerJobLV", root, lvjobser) 
  
function moneyLV (attacker) 
    if (attacker) and (attacker ~= source) then 
     givePlayerMoney(attacker, 6000) 
     setPlayerWantedLevel(attacker, getPlayerWantedLevel(attacker)+4) 
     destroyElement(markerLV) 
     destroyElement(blipLV) 
     destroyElement(carlv) 
end 
end 
addEventHandler( "onMarkerHit", root, moneyLV ) 
  
  
function sfjobser () 
     carSF = createVehicle (440, 2460.52, -2004.38, 13.54) 
     warpPedIntoVehicle(source, carSF) 
     markerSF = createMarker (-2052.80, 144.87, 27.83, "cylinder", 2, 255, 0, 0, 255) 
     blipSF = createBlipAttachedTo (markerSF, 40) 
end 
addEvent ("givePlayerJobSF", true) 
addEventHandler ("givePlayerJobSF", root, sfjobser) 
  
function moneySF (attacker) 
    if (attacker) and (attacker ~= source) then 
     givePlayerMoney(attacker, 10000) 
     setPlayerWantedLevel(attacker, getPlayerWantedLevel(attacker)+6) 
     destroyElement(markerSF) 
     destroyElement(blipSF) 
     destroyElement(carSF) 
end 
end 
addEventHandler( "onMarkerHit", root, moneySF ) 

Link to comment

Change the team name.

  
GUIEditor_Label = {} 
  
transWindow = guiCreateWindow(182,134,482,342,"Drug Transport Window",false) 
guiSetVisible(transWindow, false) 
destiLabel = guiCreateLabel(19,33,450,55,"Choose your destination",false,transWindow) 
lsButtonRadio = guiCreateRadioButton(21,104,437,19,"Los Santos, +2 Wanted Stars and 3000 if you made it",false,transWindow) 
lvButtonRadio = guiCreateRadioButton(20,149,437,19,"Las Venturas, +4 Wanted Stars and 6000 if you made it",false,transWindow) 
sfButtonRadio = guiCreateRadioButton(20,193,437,19,"San Fierro, +6 Wanted Stars and 10000 if you made it",false,transWindow) 
acceptButton = guiCreateButton(103,267,113,37,"Accept",false,transWindow) 
closeButton = guiCreateButton(241,266,108,37,"Close",false,transWindow) 
  
local jobmarker = createMarker ( 2448.68, -1976.63, 12.54, "cylinder", 2, 255, 0, 0, 255 ) 
createBlipAttachedTo (jobmarker, 40) 
function MarkerHit ( hitPlayer, matchingDimension ) 
if not getPlayerTeam(hitPlayer) == getTeamFromName("Criminal") return end 
    guiSetVisible(transWindow, true) 
    showCursor(true) 
    end 
addEventHandler ( "onClientMarkerHit", jobmarker, MarkerHit ) 
  
function closeChangeJobWindow() 
    if (source == closeButton) then 
        guiSetVisible(transWindow, false) 
        showCursor(false) 
    end 
end 
addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), closeChangeJobWindow) 
  
function lsjobcli() 
   if (source == acceptButton) then 
            if (guiRadioButtonGetSelected(lsButtonRadio)) then 
        triggerServerEvent ("givePlayerJobLS",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, lsjobcli, false ) 
  
function lvjobcli() 
   if (source == acceptButton) then 
            if (guiRadioButtonGetSelected(lvButtonRadio)) then 
        triggerServerEvent ("givePlayerJobLV",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, lvjobcli, false ) 
  
function sfjobcli() 
   if (source == acceptButton) then 
            if (guiRadioButtonGetSelected(sfButtonRadio)) then 
        triggerServerEvent ("givePlayerJobSF",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, sfjobcli, false ) 
  

Link to comment

but i try it now it not working it had two bug i fix it but is still not working.when i hit marker gui is not opening.

this is code

Client

GUIEditor_Label = {} 
  
transWindow = guiCreateWindow(182,134,482,342,"Drug Transport Window",false) 
guiSetVisible(transWindow, false) 
destiLabel = guiCreateLabel(19,33,450,55,"Choose your destination",false,transWindow) 
lsButtonRadio = guiCreateRadioButton(21,104,437,19,"Los Santos, +2 Wanted Stars and 3000 if you made it",false,transWindow) 
lvButtonRadio = guiCreateRadioButton(20,149,437,19,"Las Venturas, +4 Wanted Stars and 6000 if you made it",false,transWindow) 
sfButtonRadio = guiCreateRadioButton(20,193,437,19,"San Fierro, +6 Wanted Stars and 10000 if you made it",false,transWindow) 
acceptButton = guiCreateButton(103,267,113,37,"Accept",false,transWindow) 
closeButton = guiCreateButton(241,266,108,37,"Close",false,transWindow) 
  
local jobmarker = createMarker ( 2448.68, -1976.63, 12.54, "cylinder", 2, 255, 0, 0, 255 ) 
createBlipAttachedTo (jobmarker, 40) 
  
function closeChangeJobWindow() 
    if (source == closeButton) then 
        guiSetVisible(transWindow, false) 
        showCursor(false) 
    end 
end 
addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), closeChangeJobWindow) 
  
function lsjobcli() 
   if (source == acceptButton) then 
            if (guiRadioButtonGetSelected(lsButtonRadio)) then 
        triggerServerEvent ("givePlayerJobLS",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, lsjobcli, false ) 
  
function lvjobcli() 
   if (source == acceptButton) then 
            if (guiRadioButtonGetSelected(lvButtonRadio)) then 
        triggerServerEvent ("givePlayerJobLV",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, lvjobcli, false ) 
  
function sfjobcli() 
   if (source == acceptButton) then 
            if (guiRadioButtonGetSelected(sfButtonRadio)) then 
        triggerServerEvent ("givePlayerJobSF",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, sfjobcli, false ) 

server

function lsjobser () 
     car = createVehicle (440, 2460.52, -2004.38, 13.54) 
     warpPedIntoVehicle(source, car) 
     markerLS = createMarker (1784.78, -1702.06, 12.50, "cylinder", 2, 255, 0, 0, 255) 
     blipLS = createBlipAttachedTo (markerLS, 40) 
end 
function MarkerHit ( hitPlayer, matchingDimension ) 
if not getPlayerTeam(hitPlayer) == getTeamFromName("Criminal") then return end 
    guiSetVisible(transWindow, true) 
    showCursor(true) 
    end 
  
addEvent ("givePlayerJobLS", true) 
addEventHandler ("givePlayerJobLS", root, lsjobser) 
  
function moneyLS (attacker) 
     if (attacker) and (attacker ~= source) then 
     givePlayerMoney(attacker, 3000) 
     setPlayerWantedLevel(attacker, getPlayerWantedLevel(attacker)+2) 
     destroyElement(markerLS) 
     destroyElement(blipLS) 
     destroyElement(car) 
end 
end 
addEventHandler( "onMarkerHit", root, moneyLS ) 
  
function lvjobser () 
     carlv = createVehicle (440, 2460.52, -2004.38, 13.54) 
     warpPedIntoVehicle(source, carlv) 
     markerLV = createMarker (1074.43, 1292.71, 9.82, "cylinder", 2, 255, 0, 0, 255) 
     blipLV = createBlipAttachedTo (markerLV, 40) 
end 
addEvent ("givePlayerJobLV", true) 
addEventHandler ("givePlayerJobLV", root, lvjobser) 
  
function moneyLV (attacker) 
    if (attacker) and (attacker ~= source) then 
     givePlayerMoney(attacker, 6000) 
     setPlayerWantedLevel(attacker, getPlayerWantedLevel(attacker)+4) 
     destroyElement(markerLV) 
     destroyElement(blipLV) 
     destroyElement(carlv) 
end 
end 
addEventHandler( "onMarkerHit", root, moneyLV ) 
  
  
function sfjobser () 
     carSF = createVehicle (440, 2460.52, -2004.38, 13.54) 
     warpPedIntoVehicle(source, carSF) 
     markerSF = createMarker (-2052.80, 144.87, 27.83, "cylinder", 2, 255, 0, 0, 255) 
     blipSF = createBlipAttachedTo (markerSF, 40) 
end 
addEvent ("givePlayerJobSF", true) 
addEventHandler ("givePlayerJobSF", root, sfjobser) 
  
function moneySF (attacker) 
    if (attacker) and (attacker ~= source) then 
     givePlayerMoney(attacker, 10000) 
     setPlayerWantedLevel(attacker, getPlayerWantedLevel(attacker)+6) 
     destroyElement(markerSF) 
     destroyElement(blipSF) 
     destroyElement(carSF) 
end 
end 
addEventHandler( "onMarkerHit", root, moneySF ) 

Link to comment

server

  
x, y, z = 1, 1, 1 -- lv positiion change ti 
  
function lsjobser () 
    car = createVehicle (440, 2460.52, -2004.38, 13.54) 
    warpPedIntoVehicle(source, car) 
    markerLS = createMarker (1784.78, -1702.06, 12.50, "cylinder", 2, 255, 0, 0, 255) 
    blipLS = createBlipAttachedTo (markerLS, 40) 
end 
  
function MarkerHit ( hitPlayer, matchingDimension ) 
    carls = createVehicle (440, x, y, z) 
    warpPedIntoVehicle(source, carls) 
    markerLS = createMarker (x, y, z, "cylinder", 2, 255, 0, 0, 255) 
    blipLS = createBlipAttachedTo (markerLS, 40) 
end 
addEvent ("givePlayerJobLS", true) 
addEventHandler ("givePlayerJobLS", root, lsjobser) 
  
function moneyLS (attacker) 
    if (attacker) and (attacker ~= source) then 
        givePlayerMoney(attacker, 3000) 
        setPlayerWantedLevel(attacker, getPlayerWantedLevel(attacker)+2) 
        destroyElement(markerLS) 
        destroyElement(blipLS) 
        destroyElement(car) 
    end 
end 
addEventHandler( "onMarkerHit", root, moneyLS ) 
  
function lvjobser () 
    carlv = createVehicle (440, 2460.52, -2004.38, 13.54) 
    warpPedIntoVehicle(source, carlv) 
    markerLV = createMarker (1074.43, 1292.71, 9.82, "cylinder", 2, 255, 0, 0, 255) 
    blipLV = createBlipAttachedTo (markerLV, 40) 
end 
addEvent ("givePlayerJobLV", true) 
addEventHandler ("givePlayerJobLV", root, lvjobser) 
  
function moneyLV (attacker) 
    if (attacker) and (attacker ~= source) then 
        givePlayerMoney(attacker, 6000) 
        setPlayerWantedLevel(attacker, getPlayerWantedLevel(attacker)+4) 
        destroyElement(markerLV) 
        destroyElement(blipLV) 
        destroyElement(carlv) 
    end 
end 
addEventHandler( "onMarkerHit", root, moneyLV ) 
  
  
function sfjobser () 
    carSF = createVehicle (440, 2460.52, -2004.38, 13.54) 
    warpPedIntoVehicle(source, carSF) 
    markerSF = createMarker (-2052.80, 144.87, 27.83, "cylinder", 2, 255, 0, 0, 255) 
    blipSF = createBlipAttachedTo (markerSF, 40) 
end 
addEvent ("givePlayerJobSF", true) 
addEventHandler ("givePlayerJobSF", root, sfjobser) 
  
function moneySF (attacker) 
    if (attacker) and (attacker ~= source) then 
        givePlayerMoney(attacker, 10000) 
        setPlayerWantedLevel(attacker, getPlayerWantedLevel(attacker)+6) 
        destroyElement(markerSF) 
        destroyElement(blipSF) 
        destroyElement(carSF) 
    end 
end 
addEventHandler( "onMarkerHit", root, moneySF ) 
  

client

  
  
GUIEditor_Label = {} 
  
transWindow = guiCreateWindow(182,134,482,342,"Drug Transport Window",false) 
guiSetVisible(transWindow, false) 
destiLabel = guiCreateLabel(19,33,450,55,"Choose your destination",false,transWindow) 
lsButtonRadio = guiCreateRadioButton(21,104,437,19,"Los Santos, +2 Wanted Stars and 3000 if you made it",false,transWindow) 
lvButtonRadio = guiCreateRadioButton(20,149,437,19,"Las Venturas, +4 Wanted Stars and 6000 if you made it",false,transWindow) 
sfButtonRadio = guiCreateRadioButton(20,193,437,19,"San Fierro, +6 Wanted Stars and 10000 if you made it",false,transWindow) 
acceptButton = guiCreateButton(103,267,113,37,"Accept",false,transWindow) 
closeButton = guiCreateButton(241,266,108,37,"Close",false,transWindow) 
  
local jobmarker = createMarker ( 2448.68, -1976.63, 12.54, "cylinder", 2, 255, 0, 0, 255 ) 
createBlipAttachedTo (jobmarker, 40) 
  
function onMarkerHit( player ) 
    if localPlayer == player and getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == "Criminal" then 
        guiSetVisible( transWindow, true ) 
        showCursor( true ) 
    end 
end 
addEventHandler( "onClientMarkerHit", jobmarker, onMarkerHit ) 
  
function closeChangeJobWindow() 
    if (source == closeButton) then 
        guiSetVisible(transWindow, false) 
        showCursor(false) 
    end 
end 
addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), closeChangeJobWindow) 
  
function lsjobcli() 
   if (source == acceptButton) then 
            if (guiRadioButtonGetSelected(lsButtonRadio)) then 
        triggerServerEvent ("givePlayerJobLS",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, lsjobcli, false ) 
  
function lvjobcli() 
   if (source == acceptButton) then 
            if (guiRadioButtonGetSelected(lvButtonRadio)) then 
        triggerServerEvent ("givePlayerJobLV",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, lvjobcli, false ) 
  
function sfjobcli() 
   if (source == acceptButton) then 
            if (guiRadioButtonGetSelected(sfButtonRadio)) then 
        triggerServerEvent ("givePlayerJobSF",getLocalPlayer()) 
        guiSetVisible(transWindow, false) 
      showCursor(false) 
    end 
end 
end 
addEventHandler("onClientGUIClick", acceptButton, sfjobcli, false ) 
  

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...