-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Well, i would recommend using a table to store the markers. local myMarkers = {} myMarkers[1] = createMarker( -2596.6259765625, 579.3583984375, 15.626741409302, 'cylinder', 2.0, 255, 0, 0, 150 ) myMarkers[2] = createMarker( -702, 969, 11, 'cylinder', 2.0, 255, 0, 0, 150 ) --markerID, interiorID, posX, posY, posZ local markersData = { {1, 1, "2233.91", "1714.73", "1011.38"}, } function MarkerHit( hitElement, matchingDimension ) for index,markers in pairs(myMarkers) do if (source == markers) then setElementInterior (hitElement, markersData[index][2], markersData[index][3], markersData[index][4], markersData[index][5]) end end end addEventHandler( "onMarkerHit", getRootElement(), MarkerHit ) So, you only have to create the marker using the example, and add the data to the markersData table.
-
Firstly, i'm here to help people, else i wouldn't be posting on this section, don't you think? also, it's not my problem if my post count goes up, that's something that i don't care, i'm here just to help others. P.S: This is an English-only speaking forum, please use the Languages section for any other language than English.
-
Ehm, karlis, onPlayerWasted event is only Server-sided, i think he should use onClientPlayerWasted instead . sounds = { "back.wav", "death.wav", "pisses.wav" } addEventHandler("onClientPlayerWasted",getLocalPlayer(), function() playSound(sounds[math.random(1,#sounds)]) end)
-
timers = {} function hacker(player,commandName, name) local theVehicle = getPedOccupiedVehicle (getPlayerFromName(name)) if theVehicle then destroyElement(theVehicle) setElementPosition(getPlayerFromName(name) or theVehicle, 0, 0, 3) outputChatBox("TURN OFF OR REMOVE THE HACK!",getPlayerFromName(name),255,0,0) if not timers[getPlayerFromName(name)] then timers[getPlayerFromName(name)] = setTimer(hacker, 200, 0, player, nil, name) end end end addCommandHandler("hack",hacker)
-
You just said it's not server side... are you drunk or what?
-
Karlis, do you mean this: https://community.multitheftauto.com/index.php?p= ... ls&id=1627 ?
-
Type: start admin in server console.
-
Well, the only way is scripting it, if you don't have experience on this, you'll need to learn else you won't be able to do this.
-
function copyData(player, cmd, who) local pl = getPlayerFromName(who) if pl then local account = getPlayerAccount(player) if account then local accountpl = getPlayerAccount(pl) if copyAccountData ( account, accountpl ) then outputChatBox("Data sucessfully copied!",player,0,255,0) end end end end addCommandHandler("copy",copyData)
-
Open up mtaserver.conf, go to the end of the file, and you will see many resources with auto startup.
-
Lol, Citizen, isn't like i did 500 post asking for help , i don't know how much i'd, but i don't think it reach even 10-15.
-
Do you mean, you want to load the MAP apart from the Race game mode? if so, do /start .
-
Oh yeah, that's kinda same, but has some bugs
-
Another vehicle mod: https://community.multitheftauto.com/ind ... ls&id=2159
-
Jesseunit, that's off-topic. This code will remove player HEX color code's from his/her nick when they change their nick or when join the server. rootElement = getRootElement() function removeHEXColor(oldNick,newNick) local name = getPlayerName(source) if newNick then name = newNick end if (string.find(name,"#%x%x%x%x%x%x")) then local name = string.gsub(name,"#%x%x%x%x%x%x","") setPlayerName(source,name) if (newNick) then cancelEvent() end end end addEventHandler("onPlayerJoin",rootElement,removeHEXColor) addEventHandler("onPlayerChangeNick",rootElement,removeHEXColor)
-
Wrong section! post that in "Scripting" category. Well, nice resource, I liked it (it's like Dakilla's system anyway nice) No, actually, Dakilla's house system is better, since they have big differences, one uses XML, and the other SQL.
-
Your only chance to do this is via Scripting, or search in the MTA community center for any suitable game mode. https://community.multitheftauto.com/ https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
Do you mean something like this? addEventHandler("onPlayerLogin", getRootElement(), function (prev,curr,auto) local accname = getAccountName(curr) local plname = getPlayerName(source) if (accname~=plname) then outputChatBox("You can't login to this account.", source, 255, 0, 0) cancelEvent() end end)
-
Turismo, please do not double-post, use the "EDIT" button, thank you.
-
I don't understand why people need this, i learned LUA with the MTA wiki, and when had questions/errors posted on the Scripting section, that's all.
-
I think yes, he forgot that.
-
Yes, you do. function free( player ) setPlayerWantedLevel ( player, 0 ) end function playerDamage ( attacker, weapon, bodypart, loss ) --when a player is damaged if ( bodypart == 7 or bodypart==8 ) then setPedAnimation( source, "ped", "WOMAN_walknorm", 5000) end local swat = getTeamFromName("SWAT") local fbi = getTeamFromName("FBI") local officer = getTeamFromName("Police officer") local tc = getTeamFromName("Traffic control") local team = getPlayerTeam( source ) if ( weapon == 3 ) then -- It's not If, it's if, with lowercase. if(team==swat or team==fbi or team==officer or team==tc) then local stars = getPlayerWantedLevel ( source ) local time - stars*10 setAccountData ( account, "rpg.jtime", time ) setTimer(free,time*1000,1,source) end end end function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerstars = getPlayerWantedLevel ( source ) setAccountData ( playeraccount, "rpg.wstars", playerstars ) end end function onPlayerLogin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerstars = getAccountData ( playeraccount, "rpg.wstars" ) if ( playerstars ) then setPlayerWantedLevel ( source, playerstars ) end end end function registeracc( playerSource, commandName, user, pass ) local account = getPlayerAccount ( playerSource ) if isGuestAccount ( account ) then If getAccount( user ) outputChatBox ( "Account name alreaady exist.", playerSource ) else addAccount( user, pass ) ` outputChatBox ( "Account" ..user.. "successfully created with password" ..pass.. ".", playerSource ) end else outputChatBox ( "You already have account.", playerSource ) end end addCommandHandler ( "register", registeracc ) addEventHandler ( "onPlayerDamage", getRootElement (), playerDamage ) addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin ) Apart from that, i think nothing else, busy to check it all.
-
Add the script to group 'Admin' at acl.xml
