-
Posts
292 -
Joined
-
Last visited
Everything posted by Wumbaloo
-
Use https://wiki.multitheftauto.com/wiki/SmoothMoveCamera ?
-
No problem, sorry for codes that doesn't work.
-
function resourceStart() local players = getElementsByType ( "player" ) for key, player in ipairs ( players ) do setPlayerNametagShowing ( player, false) if(getElementData(getLocalPlayer(), tonumber(player) == 1) then setPlayerNametagShowing ( player, true ) end end end addEventHandler ( "onClientResourceStart", getResouceRootElement(getThisResource()), resourceStart
-
function resourceStart() local players = getElementsByType ( "player" ) for key, player in ipairs ( players ) do setPlayerNametagShowing ( player, false) if(getElementData(getLocalPlayer(), tonumber(player) == 1) then setPlayerNametagShowing ( player, true ) end end end addEventHandler ( "onResourceStart", getResouceRootElement(getThisResource()), resourceStart
-
Forgot to setPlayerNametagShowing off for other player, but yea, should work function resourceStart() local players = getElementsByType ( "player" ) for key, player in ipairs ( players ) do setPlayerNametagShowing ( player, false) if(getElementData(source, tonumber(player) == 1) then setPlayerNametagShowing ( player, true ) end end end addEventHandler ( "onResourceStart", getResouceRootElement(getThisResource()), resourceStart
-
Try to use setPlayerNametagShowing and a boucle for to get player's friends with a getElementData ? All of this client sided Example: --Client Side function resourceStart( ) local players = getElementsByType ( "player" ) for key, player in ipairs ( players ) do -- Make your getElementData here or get if localPlayer and player are friends setPlayerNametagShowing ( player, false ) end end addEventHandler ( "onResourceStart", getResouceRootElement(getThisResource()), resourceStart )
-
Nouvelle vidéo sur les accessoires !
-
Salut ! Je l'ai ajouté sur Skype, je lui ai donné quelques pistes pour apprendre, comment j'avais fais, et je suis ouvert à toute les questions ! Je l'ai invité à apprendre le lua et l'API de MTA en simultané, puis de visiter le wiki de MTA uniquement en anglais, j'ai décris aussi les pages du Wiki (leur contenu genre shared, client, serveur etc)
-
Salut tout le monde ! Je ne savais pas où poster pour ça car personne ne le fait mais je pense que je suis dans la bonne section. Le but de ce sujet est de vous offrir mes services de programmation en l'échange d'une rémunération. Je suis capable de faire la plupart des choses sur MTA, notamment des gamemodes de 0. Je suis déjà sur plusieurs projets donc cela dépendra de l'argent que vous me proposerez. Du coup, je vous invite à regarder ce dont je suis capable sur ma playlist YouTube : Notamment la vidéo "Furniture System" dont je suis vraiment fière. Pour vous donner une idée des prix, je fais : Gamemodes à 50€ (ajustable selon critère) Scripts (selon nombre et grosseur) Contactez moi par MP fofo, Curse sous le nom de Wumbaloo ou Skype : x-wiiiwiii-x Merci à vous !
-
Salut tout le monde! Aujourd'hui, un nouveau script concernant la connexion, l'inscription et la sélection, création de personnages! C'est un petit script mais il est bien sympa tout de même, j'vous laisse vous faire votre avis!
-
dxDrawGifImage https://wiki.multitheftauto.com/wiki/DxDrawGifImage
-
set the dxDrawText wordBreak value to true ?
-
Problem solved, just invert dff and txd.
-
Server side : "onResourceStart"
-
ExitTrainingData = {} local ExitTrainingTable = { {"[Gh|DZ]",-1129,1066.199,1347,2325.61,-1022,1050.2,1,9}, {"X.I.I",-1129,1066.199,1347,2325.61,-1022,1050.2,2,9}, {".:[shNp]:.",-1129,1066.199,1347,2325.61,-1022,1050.2,3,9}, {"DGH",-1129,1066.199,1347,2325.61,-1022,1050.2,4,9}, {"None1",-1129,1066.199,1347,2325.61,-1022,1050.2,5,9}, {"None2",-1129,1066.199,1347,2325.61,-1022,1050.2,6,9} } for i ,v in pairs (ExitTrainingTable) do ExitTraining = createMarker(v[2],v[3],v[4],"arrow",2,0,77,136,150) setElementDimension(ExitTraining,v[8]) setElementInterior(ExitTraining, v[9]) EnterTrainingData[ExitTraining] = {v[1],v[5],v[6],v[7],v[8],v[9]} end addEventHandler("onMarkerHit",resourceRoot, function(player) local Data = ExitTrainingData[source] if ( Data ) then if not isPedInVehicle(player) and getElementData (player,"Group") == Data[1] then setElementDimension(player,Data[8]) setElementPosition(player,Data[5],Data[6],Data[7]) setElementInterior(player,Data[9]) end end end)
-
I'm not on my computer so I can't send you a example It's not complicated
-
Nah, set a table in your element data
-
Look at my code, I said you the solution twice, you forgot the v[ before the number 9 at setElementInterior
-
ExitTrainingData = {} local ExitTrainingTable = { {"[Gh|DZ]",-1129,1066.199,1347,2325.61,-1022,1050.2,1,9}, {"X.I.I",-1129,1066.199,1347,2325.61,-1022,1050.2,2,9}, {".:[shNp]:.",-1129,1066.199,1347,2325.61,-1022,1050.2,3,9}, {"DGH",-1129,1066.199,1347,2325.61,-1022,1050.2,4,9}, {"None1",-1129,1066.199,1347,2325.61,-1022,1050.2,5,9}, {"None2",-1129,1066.199,1347,2325.61,-1022,1050.2,6,9} } for i ,v in pairs (ExitTrainingTable) do ExitTraining = createMarker(v[2],v[3],v[4],"arrow",2,0,77,136,150) setElementDimension(ExitTraining,v[8]) setElementInterior(ExitTraining, v[9]) EnterTrainingData[ExitTraining] = {v[1],v[5],v[6],v[7],v[8],v[9]} end addEventHandler("onMarkerHit",resourceRoot, function(player) local Data = ExitTrainingData[source] if ( Data ) then if not isPedInVehicle(player) and getElementData (player,"Group") == Data[1] then setElementDimension(player,Data[5]) setElementPosition(player,Data[2],Data[3],Data[4]) setElementInterior(player,Data[6]) end end end)
-
So you wrote "setElementInterior, 10", replace it by "setElementInterior, v[9]"
-
You wrote "setElementInterior, 10" Instead of "setElementInterior, v[10]
-
Put the event handler in the setTimer function of marker1