-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
I don't get it, you want to save the player house when quit? if not, then I'm confused.
-
Maybe one of your script's is messing with it, post your spawning script.
-
That's because you added a check to see if he already has a name. function changename( thePlayer, command, name ) if ( not name ) then outputChatBox ("Incorrect syntax, Correct: /name ", thePlayer,255,0,0,true ) return end local newPlayerNick = name setElementData ( thePlayer, "ar.name", newPlayerNick ) outputChatBox ("Your new nickname has been set to: ".. newPlayerNick, thePlayer,0,255,0,true ) end addCommandHandler( "name", changename ) function chat( msg, type ) if (type == 0 and getElementData( source, "ar.name" ) ~= false) then cancelEvent() outputChatBox("[ " .. tostring(getElementData( source, "ar.name" )) .. " ] : " .. msg, getRootElement(), 255, 255, 255, true) end end addEventHandler("onPlayerChat", root, chat )
-
function changename( thePlayer, command, name ) if ( not name ) then outputChatBox ("Incorrect syntax, Correct: /name ", thePlayer,255,0,0,true ) return end local newPlayerNick = name local oldNick = getElementData( thePlayer, "ar.name" ) if ( oldNick == false ) then setElementData ( thePlayer, "ar.name", newPlayerNick ) outputChatBox ("Your new nickname has been set to: ".. newPlayerNick, thePlayer,0,255,0,true ) end end addCommandHandler( "name", changename ) function chat( msg, type ) if (type == 0 and getElementData( source, "ar.name" ) ~= false) then cancelEvent() outputChatBox("[ " .. tostring(getElementData( source, "ar.name" )) .. " ] : " .. msg, getRootElement(), 255, 255, 255, true) end end addEventHandler("onPlayerChat", root, chat )
-
-- server side: addEventHandler("onPlayerWasted",root, function () local team = getPlayerTeam(source) if (team) then setElementData(source, "tempTeam", tostring(getTeamName(team))) end end) addEventHandler("onPlayerSpawn",root, function () local teamName = getElementData(source, "tempTeam") if (not teamName) then return end local team = getTeamFromName(teamName) if (team) then setPlayerTeam(source, team) end removeElementData(source, "tempTeam") end)
-
This will work with sounds played from a file, not live streams, as the length is always 0 for live streams.
-
Finished and Paused is a different thing.
-
I couldn't find such event, maybe there's a way to create it, but right now I can't think of one.
-
-- server side: local chat_range = 90 function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(msg, msgType) if (msgType == 1) then local px, py, pz=getElementPosition(source) local name = getPlayerName(source) for index, player in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(player,px,py,pz,chat_range) then outputChatBox("* ".. tostring(name) .." "..msg, player, 255, 0, 255) end end cancelEvent() end end addEventHandler("onPlayerChat",root,onChat) Deberia funcionar.
-
Lua/Code tags won't work, the text is too long.
-
Vehicle mods: https://community.multitheftauto.com/index.php?p= ... ls&id=3538 https://community.multitheftauto.com/index.php?p= ... ls&id=3539 https://community.multitheftauto.com/index.php?p= ... ls&id=3540 https://community.multitheftauto.com/index.php?p= ... ls&id=3541 https://community.multitheftauto.com/index.php?p= ... ls&id=3542 https://community.multitheftauto.com/index.php?p= ... ls&id=3543
-
It doesn't work because it was never implemented, he never finished the script.
-
Si que lo trae... todas las versiones tienen eso (por lo menos las mas actualizadas).
-
El recurso de zombies de Slothman ya tiene una columna en la scorboard llamada "Zombie kills".
-
You should learn to use the Search feature: viewtopic.php?f=91&t=38627&p=396878
-
You must edit the scoreboard to show the country flag image.
-
First: Create all gate objects onResourceStart, but in just ONE function, no need for 1 function for each object. Second: Create all your gate commands to move them. Third: In the client side use executeCommandHandler when a button is clicked.
-
Mind explaining what are you trying to do? because that's a mess.
-
It's: dxDrawText, not dxCreateText. But yes, that was pretty much what I meant.
-
He's saying that the gate is not moving to the position, is teleporting to it. That's because you're using: setElementPosition instead of moveObject. Door1 = createObject ( 3050, 1459, -1492.599, 14.8, 0, 0, 74.998 ) Door2 = createObject ( 3049, 1456.599, -1501.399, 14.8, 0, 0, 254.745 ) Doorscol = createColCircle ( 1457.88, -1497.003, 7, 15 ) local validSkins = {[241] = true, [292] = true, [305] = true, [309] = true, [50] = true} function openDoors(thePlayer) if validSkins[getElementModel( thePlayer )] then moveObject(Door1, 3000, 1459, -1489.599, 14. moveObject(Door2, 3000, 1456.599, -1504.399, 14. end end addEventHandler( "onColShapeHit", Doorscol, openDoors ) function closeDoors(thePlayer) if validSkins[getElementModel( thePlayer )] then moveObject(Door1, 3000, 1459, -1492.599, 14. moveObject(Door2, 3000, 1456.599, -1501.399, 14. end end addEventHandler( "onColShapeLeave", Doorscol, closeDoors ) Btw, you'll have to set the correct position, current one's aren't right.
