-
Posts
4,961 -
Joined
-
Last visited
Everything posted by Jaysds1
-
For the server-side, use: not getAccountData(acc,"onHaveGunLicense") and you forgot the last end in every giveGUN function, and for the giveGunLicense: addEvent('givecard', true) addEventHandler('givecard',root,function() local acc = getPlayerAccount(source) if getAccountData(acc,"onHaveGunLicense") ~= false then setAccountData(acc,'onHaveGunLicense', true) --changed source to acc else outputChatBox('* Sorry but you not have a Gun License ',source,255,0,0) end end) Damn, this one took long for me, Client-side: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[3] = guiCreateWindow(408,279,511,283,"Buy gun license (v1.0)",false) GUIEditor_Window[4] = guiCreateWindow(0.3,0.15,0.30,0.1,"Oh damn!",true) guiSetVisible(GUIEditor_Window[3],false) guiSetVisible(GUIEditor_Window[4],false) guiSetAlpha(GUIEditor_Window[4],1) guiBringToFront(GUIEditor_Window[4]) label = guiCreateLabel (0.20,0.25,0.65,0.3,"You dont have enough money to buy that.",true,GUIEditor_Window[4]) button = guiCreateButton (0.35,0.6,0.3,0.2,"Ok",true,GUIEditor_Window[4]) guiWindowSetMovable(GUIEditor_Window[3],false) guiWindowSetSizable(GUIEditor_Window[3],false) GUIEditor_Image[1] = guiCreateStaticImage(168,23,166,141,"images/mtalogo.png",false,GUIEditor_Window[3]) GUIEditor_Button[1] = guiCreateButton(162,162,196,49,"Buy gun license $ 3000",false,GUIEditor_Window[3]) guiSetFont(GUIEditor_Button[1],"clear-normal") GUIEditor_Label[1] = guiCreateLabel(10,254,296,16,"To Buy Weapons You Need to Buy gun license",false,GUIEditor_Window[3]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Button[3] = guiCreateButton(403,22,99,18,"Exit",false,GUIEditor_Window[3]) guiSetFont(GUIEditor_Button[3],"clear-normal") addEventHandler("onClientGUIClick",guiRoot,function() money = getPlayerMoney (localPlayer) --source is the button the person clicked, use localPlayer if (source == GUIEditor_Button[29]) then guiSetVisible (GUIEditor_Window[1],false) showCursor (false) elseif (source == GUIEditor_Button[30]) then guiSetVisible (GUIEditor_Window[2],false) showCursor (false) elseif (source == GUIEditor_Button[1]) then if (money >= 100) then outputChatBox ("You bought a Pistol $100",225,225,0) takePlayerMoney(100) triggerServerEvent ("give45",getLocalPlayer(),give45) else guiSetVisible(GUIEditor_Window[2],true) guiSetVisible(GUIEditor_Window[1],false) end elseif (source == GUIEditor_Button[2]) then if (money >= 200) then outputChatBox ("You bought a Silenced $200",225,225,0) takePlayerMoney(200) triggerServerEvent ("givesilenced",getLocalPlayer(),givesilenced) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[3]) then if (money >= 600) then outputChatBox ("You bought a Desert Eagle $600",225,225,0) takePlayerMoney(600) triggerServerEvent ("givedeagle",getLocalPlayer(),givedeagle) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[4]) then if (money >= 500) then outputChatBox ("You bought a Shotgun $500",225,225,0) takePlayerMoney(500) triggerServerEvent ("givesh",getLocalPlayer(),givesh) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[5]) then if (money >= 700) then outputChatBox ("You bought a Sawn Off $700",225,225,0) takePlayerMoney(700) triggerServerEvent ("giveso",getLocalPlayer(),giveso) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[6]) then if (money >= 1000) then outputChatBox ("You bought a SPAZ-12 $1000",225,225,0) takePlayerMoney(1000) triggerServerEvent ("giveSP",getLocalPlayer(),giveSP) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[7]) then if (money >= 400) then outputChatBox ("You bought a Tec-9 $400",225,225,0) takePlayerMoney(400) triggerServerEvent ("givetec",getLocalPlayer(),givetec) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[8]) then if (money >= 600) then outputChatBox ("You bought a Uzi $600",225,225,0) takePlayerMoney(600) triggerServerEvent ("giveuzi",getLocalPlayer(),giveuzi) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[9]) then if (money >= 800) then outputChatBox ("You bought a MP5 $800",225,225,0) takePlayerMoney(800) triggerServerEvent ("givemp5",getLocalPlayer(),givemp5) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[11]) then if (money >= 1000) then outputChatBox ("You bought an AK-47 $1000",225,225,0) takePlayerMoney(1000) triggerServerEvent ("giveak",getLocalPlayer(),giveak) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[10]) then if (money >= 2000) then outputChatBox ("You bought a M4 $2000",225,225,0) takePlayerMoney(2000) triggerServerEvent ("givem4",getLocalPlayer(),givem4) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[13]) then if (money >= 3000) then outputChatBox ("You bought a Sniper $3000",225,225,0) takePlayerMoney(3000) triggerServerEvent ("gives",getLocalPlayer(),gives) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[12]) then if (money >= 1000) then outputChatBox ("You bought a Country Sniper $1000",225,225,0) takePlayerMoney(1000) triggerServerEvent ("givecs",getLocalPlayer(),givecs) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[25]) then if (money >= 1000) then outputChatBox ("You bought a MedKit $1000",225,225,0) takePlayerMoney(1000) triggerServerEvent ("givehealth",getLocalPlayer(),givehealth) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[26]) then if (money >= 1500) then outputChatBox ("You bought a Bullet Proof Vest $1500",225,225,0) takePlayerMoney(1500) triggerServerEvent ("givearmor",getLocalPlayer(),givearmor) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == button) then guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[1],true) elseif (source == GUIEditor_Button[1]) then if (money >= 3000) then takePlayerMoney(3000) triggerServerEvent ("givecard",localPlayer) else guiSetVisible(GUIEditor_Window[2],true) guiSetVisible(GUIEditor_Window[1],false) elseif ( source == GUIEditor_Button[3] ) then guiSetVisible(GUIEditor_Window[3],true) guiSetVisible(GUIEditor_Window[4],false) end end end,true) --forgot the true, since it's a button and it's for a group of buttons function showGUI () if(eventName=="showGUI")then guiSetVisible (GUIEditor_Window[1],true) showCursor (true) else guiSetVisible (GUIEditor_Window[3],true) showCursor(true) end end addEvent ("showGUI",true) addEventHandler ("showGUI",getRootElement(),showGUI) addEvent ("showGUI2",true) addEventHandler ("showGUI2",getRootElement(),showGUI)
-
What version are you using?
-
I suggest putting it on http://www.pastebin.com as Private and pming the url to mjr. (So no one steals it and claim it as their script/code)
-
try this: function banThatPlayer(thePlayer, command, tPlayer, reason) local reason = table.concat ( { ... }, " " ) if(type(tPlayer)=="number" or "int")then tPlayer = tostring(tPlayer) end local tPlayer = getPlayerFromName(tPlayer) local acc = getPlayerAccount( tPlayer ) if(isGuestAccount(acc))then outputChatBox("This player is not logged in.",thePlayer,100,0,0) end if(setAccountData( acc, "Occupation", "Banned" ))and(setAccountData( acc, "BannedReason", reason ))then outputChatBox("Player: "..tPlayer.." got banned because "..reason.." .",root) end kickPlayer( tPlayer, "banned" ) end addCommandHandler("blazyban", banThatPlayer)
-
try this: --clientSide GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Progress = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(408,279,511,283,"Buy gun license (v1.0)",false) GUIEditor_Window[2] = guiCreateWindow(0.3,0.15,0.30,0.1,"Oh damn!",true) guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[2],1) guiBringToFront(GUIEditor_Window[2]) label = guiCreateLabel (0.20,0.25,0.65,0.3,"You dont have enough money to buy that.",true,GUIEditor_Window[2]) button = guiCreateButton (0.35,0.6,0.3,0.2,"Ok",true,GUIEditor_Window[2]) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Image[1] = guiCreateStaticImage(168,23,166,141,"images/mtalogo.png",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(162,162,196,49,"Buy gun license $ 3000",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[1],"clear-normal") GUIEditor_Label[1] = guiCreateLabel(10,254,296,16,"To Buy Weapons You Need to Buy gun license",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Button[2] = guiCreateButton(403,22,99,18,"Exit",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[2],"clear-normal") GUIEditor_Progress[1] = guiCreateProgressBar(537,26,0,5,false,GUIEditor_Window[1]) addEventHandler('onClientGUIClick', guiRoot, function() --changed root to guiRoot local money = getPlayerMoney(localPlayer) if (source == GUIEditor_Button[1]) then if (money >= 3000) then takePlayerMoney(3000) triggerServerEvent ("givecard",localPlayer) else guiSetVisible(GUIEditor_Window[2],true) guiSetVisible(GUIEditor_Window[1],false) end elseif (source == GUIEditor_Button[2] ) then guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[1],false) showCursor( false ) local Marker2 = createMarker ( 286, -35, 1001, "cylinder", 2, 255, 255, 0, 150 ) setElementInterior( Marker2, 1, 286, -35, 1001 ) addEventHandler('onClientMarkerHit', Marker2,function ( hitPlayer ) if ( hitPlayer == localPlayer ) then guiSetVisible ( GUIEditor_Window[1], true ) showCursor( true ) end end) end end,true) --remember to add true for sources or false for single buttons --serverSide addEventHandler ( "onResourceStart",resourceRoot,function ( ) ped = createPed ( 46, 286, -35, 1001 ) setElementInterior( ped, 1, 286, -35, 1001 ) end)
-
What do you use to start your maps? (Race? TeamDM?)
-
This can return any thing back to the server or the script if it's used for executing...
-
[Trailer] MTA:SA TwinGold Roleplay Official Trailer
Jaysds1 replied to Jack_White(Gundi)'s topic in Media
+1 -
Damn, what a ruff night for me Thanks for tell me Solid :\
-
how? Did you got any error in debugscript? Did you see any messages like Welcome... and Cya...?
-
lol, you copied my code with the error in it, the colShape needs to be lowercased
-
Can you download and run this MTADiag then post the generated PasteBin url here.
-
sorry, I found my mistake... copy it again
-
You didn't define "point","objectairportgate1","omgMoveobjectairportgate1" and please organize your script (use Notepad++), Anyways, here: local Marker = createMarker ( 1007.4000244141, -2302.6999511719, 12.10000038147, "cylinder", 1.29999995, 255, 0, 0, 255 ) addEventHandler('onClientMarkerHit', Marker,function(hitPlayer) if (hitPlayer == localPlayer) then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end) addEventHandler("onClientResourceStart", resourceRoot, CreateGUIWindow) function CreateGUIWindow() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(502,268,480,290,"",false) GUIEditor_Image[1] = guiCreateStaticImage(240,20,229,261,"images/space.png",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(10,251,91,30,"Buy Ticket",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(155,251,69,30,"Exit",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(15,20,219,221,"=====|MoonTrip|=====\nWelcome to the\" MoonTrip\", the moon trip is wonderful trip full of mystery stuff and nice gravitation,You'll find the absolute fun but try to find fun enough \nbecause time is only 10 minutes you will find above signs should find it in different areas, each one under 5k have a nice time\n====|Ticket|====\nMoon 50,000$=====|MoonTrip|====",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) guiSetVisible(GUIEditor_Window[1], false) addEventHandler("onClientGUIClick", GUIEditor_Button[1], take, false) addEventHandler("onClientGUIClick", GUIEditor_Button[1], move, false) end function take() if( getPlayerMoney( localPlayer ) >= 100000 ) then takePlayerMoney (100000) outputChatBox("#00ff00You bought a ticket you can go to the rocket now have a nice trip.",255,255,255,true) guiSetVisible(GUIEditor_Window[1],false) guiSetInputEnabled(false) showCursor(false) else outputChatBox("#FFFF00Sorry, you don't have enough money",255,255,255,true) end end function move() if (point == 1) then moveObject(objectairportgate1, 5000, 1002.5999755859, -2310.1999511719, 20, 0, 0, 0) setTimer(omgMoveobjectairportgate1, 5000+7000, 1, 2) elseif( point == 2) then moveObject(objectairportgate1, 5000, 1002.599609375, -2310.19921875, 14.89999961853, 0, 0, 0) setTimer(omgMoveobjectairportgate1, 5000+7000, 1, 1) end end local Marker = createMarker ( -28.599609375, 163.8994140625, 1.3999999761581, "cylinder", 1.60000002, 255, 0, 0, 255 ) addEventHandler('onClientMarkerHit', Marker,function(hitPlayer) if (hitPlayer == localPlayer) then guiSetVisible(GUIEditor_Window[2], true) showCursor(true) end end) function CreateFarm() GUIEditor_Window[2] = guiCreateWindow(18,307,367,431,"",false) guiSetAlpha(GUIEditor_Window[2],1) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Button[3] = guiCreateButton(22,377,88,42,"Work",false,GUIEditor_Window[2]) GUIEditor_Button[4] = guiCreateButton(246,383,86,39,"Exit",false,GUIEditor_Window[2]) GUIEditor_Memo[2] = guiCreateMemo(16,32,339,216,"=====|Farm Job|=====\nWelcome to the farm job\nthe farm job is about farm stuff \nso when you start go get the parcel of Seed\nand it's located on your map then go\nto the farm and drop the seed onto every arrow when you done wait 5 sec to get the plant\ngrown and go get the combine harvester and collect your crops when you done collecting \nhit the checkpoints and you get \n1200$\n\n=====|Farm Job|=====",false,GUIEditor_Window[2]) guiMemoSetReadOnly(GUIEditor_Memo[2],true) guiSetVisible(GUIEditor_Window[2], false) addEventHandler("onClientGUIClick", GUIEditor_Button[3], skins, false) local skins = -- Create a table with our skin names and their ID's. { { "Farmer", 158 }, { "Farmer Redneck", 159 }, { "Farmer Girl", 157 } } GUIEditor_Grid[1] = guiCreateGridList(12,260,346,79,false,GUIEditor_Window[2]) guiGridListAddColumn(GUIEditor_Grid[1],"Select your skin",0.4) for index, skin in ipairs ( skins ) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, 1, skin [ 1 ], false, false ) guiGridListSetItemData ( GUIEditor_Grid[1], row, 1, skin [ 2 ] ) end end addEventHandler('onClientGUIClick', guiRoot,function() if ( source == GUIEditor_Button[2] ) then guiSetVisible(GUIEditor_Window[1],false) guiSetInputEnabled(false) showCursor(false) elseif ( source == GUIEditor_Button[4] ) then guiSetVisible(GUIEditor_Window[2],false) guiSetInputEnabled(false) showCursor(false) end end,true)
-
try this: door = createObject(8948,-597.79998779297,-476.89999389648,26.299999237061,0,0,0) colshape = createColRectangle(-593.90002441406,-476.79998779297,3,-5) addEventHandler("onColShapeHit",colshape,function(hitElement) if(getElementType(hitElement)=="player"or"vehicle")then if(getElementModel(hitElement)==124 or 125 or 126 or 163 or 164 or 292 or 293 or 294)then moveObject(door,-597.79998779297,-476.89999389648,22.700000762939,0,0,0) outputChatBox("Welcome "..getPlayerName(hitElement),hitElement) end end end) addEventHandler("onColShapeLeave",colshape,function(hitElement) if(getElementType(hitElement)=="player"or"vehicle")then if(getElementModel(hitElement)==124 or 125 or 126 or 163 or 164 or 292 or 293 or 294)then moveObject(door,-597.79998779297,-476.89999389648,26.299999237061,0,0,0) outputChatBox("Cya "..getPlayerName(hitElement),hitElement) end end end) And sorry, next time you cannot ask for a script unless you attempt to try making it
-
lol, np and without me you guyz would have to put up with the community which is not on right now
-
lol, that's kinda tru but think about this... you work so hard on your script then someone of another server comes and takes it just to make theirs better... After when you release your server, some people are going to say you copied from another server, and you would tell them that they stole it from you but no one believes you
-
He probably didn't compile it
-
I found the problem, try this: addEventHandler("onClientGUIClick",guiRoot,function() local money = getPlayerMoney(localPlayer) if (source == GUIEditor_Button[29]) then guiSetVisible (GUIEditor_Window[1],false) showCursor (false) elseif (source == GUIEditor_Button[30]) then guiSetVisible (GUIEditor_Window[2],false) showCursor (false) elseif (source == GUIEditor_Button[1]) then if (money >= 100) then outputChatBox ("You bought a Pistol $100",225,225,0) takePlayerMoney(100) triggerServerEvent ("give45",localPlayer) else guiSetVisible(GUIEditor_Window[2],true) guiSetVisible(GUIEditor_Window[1],false) end elseif (source == GUIEditor_Button[2]) then if (money >= 200) then outputChatBox ("You bought a Silenced $200",225,225,0) takePlayerMoney(200) triggerServerEvent ("givesilenced",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[3]) then if (money >= 600) then outputChatBox ("You bought a Desert Eagle $600",225,225,0) takePlayerMoney(600) triggerServerEvent ("givedeagle",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[4]) then if (money >= 500) then outputChatBox ("You bought a Shotgun $500",225,225,0) takePlayerMoney(500) triggerServerEvent ("givesh",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[5]) then if (money >= 700) then outputChatBox ("You bought a Sawn Off $700",225,225,0) takePlayerMoney(700) triggerServerEvent ("giveso",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[6]) then if (money >= 1000) then outputChatBox ("You bought a SPAZ-12 $1000",225,225,0) takePlayerMoney(1000) triggerServerEvent ("giveSP",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[7]) then if (money >= 400) then outputChatBox ("You bought a Tec-9 $400",225,225,0) takePlayerMoney(400) triggerServerEvent ("givetec",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[8]) then if (money >= 600) then outputChatBox ("You bought a Uzi $600",225,225,0) takePlayerMoney(600) triggerServerEvent ("giveuzi",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[9]) then if (money >= 800) then player = getLocalPlayer() outputChatBox ("You bought a MP5 $800",225,225,0) takePlayerMoney(800) triggerServerEvent ("givemp5",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[11]) then if (money >= 1000) then outputChatBox ("You bought an AK-47 $1000",225,225,0) takePlayerMoney(1000) triggerServerEvent ("giveak",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[10]) then if (money >= 2000) then outputChatBox ("You bought a M4 $2000",225,225,0) takePlayerMoney(2000) triggerServerEvent ("givem4",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[13]) then if (money >= 3000) then outputChatBox ("You bought a Sniper $3000",225,225,0) takePlayerMoney(3000) triggerServerEvent ("gives",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[12]) then if (money >= 1000) then outputChatBox ("You bought a Country Sniper $1000",225,225,0) takePlayerMoney(1000) triggerServerEvent ("givecs",localPlayer) else guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],true) end elseif (source == GUIEditor_Button[25]) then if getElementHealth(localPlayer) == 100 then --Check their health first outputChatBox('Your Health is 100% You Cant Buy MedKit',source,255,255,0) else if money >= 1000 then --forgot then outputChatBox ("You bought a MedKit $1000",225,225,0) takePlayerMoney(1000) triggerServerEvent ("givehealth",localPlayer) end end elseif (source == GUIEditor_Button[26]) then if getPedArmor(localPlayer) == 100 then --check their armor health first outputChatBox('Your Armor is Alredy 100% You Cant Buy Armor',source,255,255,0) else if money >= 1000 then --forgot then outputChatBox ("You bought a Bullet Proof Vest $1500",225,225,0) takePlayerMoney(1500) triggerServerEvent ("givearmor",getLocalPlayer(),givearmor) end end elseif (source == GUIEditor_Button[29]) then guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[1],false) end end,true)
-
oh, sorry, change the false to true at the end
-
Sorry, I don't see any defined variables: function move() if (point == 1) then moveObject(objectairportgate1, 5000, 1002.5999755859, -2310.1999511719, 20, 0, 0, 0) mytimer = setTimer(omgMoveobjectairportgate1, 12000, 1, 2) elseif( point == 2) then moveObject(objectairportgate1, 5000, 1002.599609375, -2310.19921875, 14.89999961853, 0, 0, 0) setTimer(omgMoveobjectairportgate1, 12000, 1, 1) function stop() killTimer (mytimer) stopObject (objectairportgate1) end end end
-
lol, sorry about the code and np
-
try this: function createFBITeam () FBITeam = createTeam ("FBI", 41, 41, 41) end addEventHandler ("onResourceStart", resourceRoot, createFBITeam) function joinFBI() local gang = exports [ 'ROADgang' ]:getAccountGang ( getAccountName ( getPlayerAccount ( client ) ) ) --changed source to client (for safety reasons) if ( gang == "FBI" ) then setPlayerTeam(source,FBITeam) setElementModel(source,286) setElementData( source, "Occupation", "FBI", true ) outputChatBox("You are now an FBI agent.",source,0,255,0) end -- forgot the last end end addEvent("setFBI", true) addEventHandler("setFBI",root,joinFBI)