Baseplate
Members-
Posts
1,417 -
Joined
-
Last visited
Everything posted by Baseplate
-
Nice toy! i'll give it to my GF on Valentine's day I want it Pink
-
Perfect, Donate or gtfo..NAOW /me gives 999999999999999999999999999999999999$ to Xeno.. Now gimme that free Toy
-
The example is exactly what he want lol
-
Correction Robhol and indeed,I started my server but didn't look for any scripter cause I know i'll be dissapointed lolz, no scripter will script for u for free
-
A: Ja, a bit Q:Is Samer awesome?
-
Anyhow, RUN FOR UR LIVES!! lol meh, i'd say that we should find another Planet to live on, a good planet that we'd live on forevah ;3
-
My net is terrible those days so I need days to download them...but I have bad FPS even before
-
http://pastebin.com/8QaXX376 Okay
-
Well, my FPS became sooooo bad in MTA that I couldn't even play anymore, any ideas to rise it up?
-
Lolz, He's supposted to be everywhere?
-
I didn't get u mate, give more infos Offtopic:Still remember meh mate?
-
Well alright, this is my current script Server.lua: function joinMedic() setPlayerTeam(source, getTeamFromName("Military")) setElementModel(source,293) setElementData(source, "Occupation", "Military", true) outputChatBox("You are now Military.",source,0,255,0) end addEvent("setMili", true) addEventHandler("setMili",root,joinMedic) Client.lua: local marker = createMarker(1552.33, -1605.37, 12.5, "Cylinder",2,6,183,248,153) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} local x,y = guiGetScreenSize() windowjob = guiCreateWindow(x/2-150,y/2-199,301,397,"Military job",false) guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,352,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,352,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,215,"To take Military job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) function Medicjob(hitElement) if getElementType(hitElement) == "player" and hitElement == localPlayer then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, Medicjob) function Medicjobleave(leaveElement) if getElementType(leaveElement) == "player" and leaveElement == localPlayer then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, Medicjobleave) function joinTeam() triggerServerEvent("setMili",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeMedicWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeMedicWindow, false) Okay, i'm using Castillo's gang system, is there anyway to set this marker for Military group only?
-
function onPlayerQuit ( ) -- when a player leaves, store his current money amount in his account data local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in local playermoney = getElementData ( source, Occupation ) -- get the player data setAccountData ( playeraccount, "samgrpg.data", playermoney ) -- save it in his account end end function onPlayerLogin (_, playeraccount ) -- when a player logins, retrieve his money amount from his account data and set it if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "samgrpg.data" ) -- make sure there was actually a value saved under this key (check if playermoney is not false). -- this will for example not be the case when a player plays the gametype for the first time if ( playermoney ) then setElementData ( source, playermoney, "Occupation" ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin) So?
-
Thanks, now let's see cause I did it wrong I think function onPlayerQuit ( ) -- when a player leaves, store his current money amount in his account data local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in local playermoney = getElementData ( source ) -- get the player data setAccountData ( playeraccount, "samgrpg.data", playermoney ) -- save it in his account end end function onPlayerLogin (_, playeraccount ) -- when a player logins, retrieve his money amount from his account data and set it if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "samgrpg.data" ) -- make sure there was actually a value saved under this key (check if playermoney is not false). -- this will for example not be the case when a player plays the gametype for the first time if ( playermoney ) then setElementData ( source, playermoney ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin)
-
Hi, i'm creating a new RPG server but I need some scripters and mappers, I already have a server name is SAMG RPG, San Andreas Multi Gaming, if you're interested reply or PM me.
-
In script ofc check that wiki site it gives examples
-
As usual, Castillo helps thanks mate workin as I wanted
-
I wanna use the Teams..
-
I want to keep it on Teams mate. EDIT:I found a solution i'll test and i'll tell you policeVehicles = { [598]=true,[596]=true,[597]=true,[599]=true } copTeams = {["Police"]=true,["Military"]=true,["SWAT"]=true} function enterVehicle ( player, seat, jacked ) --when a player enters a vehicle if ( policeVehicles[getElementModel(source)] ) and ( not copTeams[getTeamName(getPlayerTeam( player ))] ) then --if the vehicle is one of 4 police cars, and the skin is not a police skin cancelEvent() outputChatBox ( "Only policeman can enter police cars!", player ) --and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) --add an event handler for onVehicleStartEnter Dosen't work
-
Dosen't work, I can get in the car it outputs that sentence
-
copVehicles = { [523]=true,[598]=true,[596]=true,[597]=true,[599]=true } copTeams = {["Police"]=true,["Military"]=true,["SWAT"]=true} function copenterVehicle ( player, seat, jacked ) if ( copVehicles[getElementModel ( source )] ) and ( not copTeams[getTeamName(getPlayerTeam( player ))] ) and ( seat == 0 ) then removePedFromVehicle ( player )--force the player out of the vehicle outputChatBox ( "You cannot drive this car.", 255, 0, 0, player ) --and tell the player why end end addEventHandler ( "onVehicleEnter", getRootElement(), copenterVehicle ) This is my current script so far, how can I make the player can't use the car before he open the door and gets in
-
1st.Go to admin panel then resources then click on scoreboard then settings 2nd.That's a mod prob 3nd.use this isObjectInACLGroup https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup
-
Well, I took Will's bus job and edited it a bit but when I get in a veh, any veh the blip and the marker shows up, here's my script server: local rootElement = getRootElement() local busses = {[431] = true, [437] = true} local busTable = { [1]={1812.65198, -1889.86047, 13.41406}, [2]={1825.22791, -1635.03711, 13.38281}, [3]={1855.01685, -1430.47449, 13.39063}, [4]={1732.81580, -1296.87122, 13.44294}, [5]={1473.19226, -1295.77124, 13.48315}, [6]={1443.60376, -1498.26660, 13.37650}, [7]={1426.37280, -1716.12439, 13.38281}, [8]={1315.06909, -1656.43799, 13.38281}, [9]={1359.06250, -1432.39734, 13.38281}, [10]={1169.82983, -1392.34473, 13.41728}, [11]={930.76508, -1392.92627, 13.26561}, [12]={815.24756, -1317.91345, 13.44460}, [13]={585.04199, -1320.53748, 13.40609}, [14]={526.99365, -1624.20361, 16.63225}, } function joinMedic() setPlayerTeam(source, getTeamFromName("Civilians")) setElementModel(source,15) setElementData(source, "Occupation", "Bus Driver", true) outputChatBox("You are now Bus Driver.",source,0,255,0) end addEvent("setMedic", true) addEventHandler("setMedic",root,joinMedic) function getNewBusLocation(thePlayer, ID) local x, y, z = busTable[ID][1], busTable[ID][2], busTable[ID][3] triggerClientEvent(thePlayer,"bus_set_location",thePlayer,x,y,z) end function onVehicleEnter(thePlayer) if getElementData ( thePlayer, "Occupation" ) then local x, y, z = getNewBusLocation(thePlayer, 1) setElementData(thePlayer,"busData",1) end end addEventHandler("onVehicleEnter",rootElement,onVehicleEnter) addEvent("bus_finish",true) addEventHandler("bus_finish",rootElement, function (client) if not isPedInVehicle(client) then return end if not busses[getElementModel(getPedOccupiedVehicle(client))] then return end givePlayerMoney(client, 100) if #busTable == tonumber(getElementData(client,"busData")) then setElementData(client,"busData",1) else setElementData(client,"busData",tonumber(getElementData(client,"busData"))+1) end getNewBusLocation(client, tonumber(getElementData(client,"busData"))) end) Client: local marker = createMarker(1764.77, -1896.61, 12.56, "Cylinder",2,255,255,0,255) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} local x,y = guiGetScreenSize() windowjob = guiCreateWindow(x/2-150,y/2-199,301,397,"Bus Job job",false) guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,352,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,352,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,215,"To take Bus Job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) function Medicjob(hitElement) if getElementType(hitElement) == "player" and hitElement == localPlayer then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, Medicjob) function Medicjobleave(leaveElement) if getElementType(leaveElement) == "player" and leaveElement == localPlayer then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, Medicjobleave) function joinTeam() triggerServerEvent("setMedic",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeMedicWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeMedicWindow, false) local client = getLocalPlayer( ) local rootElement = getRootElement() local marker = nil local blip = nil addEvent("bus_set_location",true) addEventHandler("bus_set_location",rootElement, function (x, y, z) marker = createMarker(tostring(x), tostring(y), tostring(z)-1, "cylinder", 3.5, 255, 255, 0, 170) blip = createBlipAttachedTo( marker, 0, 2, 255, 255, 0, 255 ) addEventHandler("onClientMarkerHit",marker,onBusStopHit) end) function onBusStopHit(hitPlayer) if not hitPlayer == client then return end triggerServerEvent("bus_finish",client,client) if isElement(blip) then destroyElement(blip) end if isElement(marker) then removeEventHandler("onClientMarkerHit",marker,onBusStopHit) destroyElement(marker) end end addEventHandler("onClientVehicleExit",rootElement, function () if isElement(marker) then removeEventHandler("onClientMarkerHit",marker,onBusStopHit) destroyElement(marker) end if isElement(blip) then destroyElement(blip) end end)
