Tete omar Posted May 9, 2012 Posted May 9, 2012 I've created a farm job gamemode and while i test it, when i joined the server and log into my account and press p, i doesn't found my game mode it says no-gamemode in admin panel and it won't run, take a look meta.xml "Farmer" type="gamemode" name="Farmjob" description="Farmstuff" /> guiwindow.lua vehicles = { "combine harvester", } function setupvehicleSelection ( theResource ) spawnScreenMenu = guiCreateWindow ( 0.15, 0.33, 0.7, 0.34, "select a skin", true ) spawnScreenOKButton = guiCreateButton ( 0.4, 0.85, 0.20, 0.15, "OK", true, spawnScreenMenu ) guiWindowSetMovable ( spawnScreenMenu, false ) guiWindowSetSizable ( spawnScreenMenu, false ) spawnScreenGridList = guiCreateGridList ( 0, 0.1, 1, 0.9, true, spawnScreenMenu ) guiGridListSetSelectionMode ( spawnScreenGridList, 1 ) guiGridListAddColumn ( spawnScreenGridList, "vehicles", 0.3 ) local row = guiGridListAddRow ( spawnScreenGridList ) guiGridListSetItemText ( spawnScreenGridList, row, 1, vehicleName, false, false ) end Farmjob.lua local myMarker = createMarker(-30.60000038147, 164.89999389648, 1.2000000476837, 'cylinder', 2.0, 255, 0, 0, 150) function MarkerHit( hitElement, matchingDimension ) -- define MarkerHit function for the handler local elementType = getElementType( hitElement ) -- get the hit element's type outputChatBox( elementType.."Welcome to farm job " read the info"", getRootElement(), 255, 255, 0 ) -- attach the element's type with the text, and output it end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- attach onMarkerHit event to MarkerH Is there any problem upper the page ? i put the game mode into grand theft auto san andreas/server/mods/deathmatch/resources/[gamemodes]/[farmjob]/ "farmjob.zip" and [maps]/farmjobmap.zip please help me !!!
Jaysds1 Posted May 9, 2012 Posted May 9, 2012 (edited) Type in the: 1. Console "refresh" or "upgrade" 2. Server/In-game "/refresh" or "/upgrade" Farmjob.lua local myMarker = createMarker(-30.60000038147, 164.89999389648, 1.2000000476837, 'cylinder', 2.0, 255, 0, 0, 150) function MarkerHit( hitElement, matchingDimension ) -- define MarkerHit function for the handler local elementType = getElementType( hitElement ) -- get the hit element's type outputChatBox( elementType.."Welcome to farm job ", getRootElement(), 255, 255, 0 ) -- attach the element's type with the text, and output it end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- attach onMarkerHit event to MarkerH guiwindow.lua vehicles = { "combine harvester", } function setupvehicleSelectionm() spawnScreenMenu = guiCreateWindow ( 0.15, 0.33, 0.7, 0.34, "select a skin", true ) spawnScreenOKButton = guiCreateButton ( 0.4, 0.85, 0.20, 0.15, "OK", true, spawnScreenMenu ) guiWindowSetMovable ( spawnScreenMenu, false ) guiWindowSetSizable ( spawnScreenMenu, false ) spawnScreenGridList = guiCreateGridList ( 0, 0.1, 1, 0.9, true, spawnScreenMenu ) guiGridListSetSelectionMode ( spawnScreenGridList, 1 ) guiGridListAddColumn ( spawnScreenGridList, "vehicles", 0.3 ) local row = guiGridListAddRow ( spawnScreenGridList ) guiGridListSetItemText ( spawnScreenGridList, row, 1, vehicleName, false, false ) end addEventHandler("onClientResourceStart",resourceRoot,setupvehicleSelection) Edited May 9, 2012 by Guest
Tete omar Posted May 9, 2012 Author Posted May 9, 2012 Type in the:1. Console "refresh" or "upgrade" 2. Server/In-game "/refresh" or "/upgrade" Does it matter?
TAPL Posted May 9, 2012 Posted May 9, 2012 "Farmer" type="gamemode" name="Farmjob" description="Farmstuff" />
Jaysds1 Posted May 9, 2012 Posted May 9, 2012 Type in the:1. Console "refresh" or "upgrade" 2. Server/In-game "/refresh" or "/upgrade" Does it matter? ya, the server automatically adds resources to a log file and start the resources that defined in the mtaserver.config if you add a resource while the server is loaded/started then it won't add the resource in the log file... so this is why you have to type in "upgrade" or "refresh" into the server, so the server knows that there's a new resource.
Tete omar Posted May 10, 2012 Author Posted May 10, 2012 "Farmer" type="gamemode" name="Farmjob" description="Farmstuff" /> So ?
TAPL Posted May 10, 2012 Posted May 10, 2012 "Farmer" type="gamemode" name="Farmjob" description="Farmstuff" /> So ? Hey kill yourself better -_-"
Tete omar Posted May 10, 2012 Author Posted May 10, 2012 "Farmer" type="gamemode" name="Farmjob" description="Farmstuff" /> So ? Hey kill yourself better -_-" Thanks i've put it on but when i run MTA Server.exe It says Error: not processsing resource 'Farmjob' as it has duplicates on different paths: Path #1: "resources\[gamemodes]\[farmjob]\farmjob" Path #2: "resources\[gamemodes]\[farmjob]\[maps]\farmjob" ..
TAPL Posted May 10, 2012 Posted May 10, 2012 The paths .. how can fix this error ? You have two choices: 1- rename one of the resource. 2- delete the resource and let one.
Tete omar Posted May 10, 2012 Author Posted May 10, 2012 The paths .. how can fix this error ? You have two choices: 1- rename one of the resource. 2- delete the resource and let one. Hey i renamed the 2 files and it working no error but i can't find the map which i created...
TAPL Posted May 10, 2012 Posted May 10, 2012 Hey i renamed the 2 files and it working no error but i can't find the map which i created... What map? You didn't post any thing in this topic related to maps. check /debugscript 3
Tete omar Posted May 10, 2012 Author Posted May 10, 2012 Hey i renamed the 2 files and it working no error but i can't find the map which i created... What map? You didn't post any thing in this topic related to maps. check /debugscript 3 It's working !!!!! thanks for help "Farmer" type="gamemode" name="Farmjob" description="Farmstuff" /> type="map" version="1.0.0"> "Farmjob.map" dimension="0"> "*spawnreset" value="onSpawn" friendlyname="Spawn Reset" accept="onSpawn,onServerEmpty,onServerStart" desc="When should a new spawnpoint be chosen?" /> "#minplayers" value="[ 0 ]"> "#maxplayers" value="[ 128 ]"> "#gravity" value="[ 0.008000 ]"> "#weather" value="[ 0 ]"> "#time" value="12:0"> "#locked_time" value="[ false ]"> "#waveheight" value="[ 0 ]"> "#gamespeed" value="[ 1 ]"> "farmjob.map" /> I put the map and the 2 script files in 1 meta and it's work right now but i need you please i want program this 2 files for the map just like 1 marker if you touch it, it show up a list and pick a skin of skins. but when i touch the marker doesn't do any thing i would be thankful if you help me here.
TAPL Posted May 10, 2012 Posted May 10, 2012 you means this? https://wiki.multitheftauto.com/wiki/GetElementID
Tete omar Posted May 11, 2012 Author Posted May 11, 2012 (edited) you means this?https://wiki.multitheftauto.com/wiki/GetElementID Thanks, but it was getElementData it was near my eyes thanks ! Edited May 29, 2012 by Guest
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