-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Vas a tener que guardar si se abrio una vez o no con: setAccountData, luego cuando hagan login, usas: getAccountData para verificar si ya se abrio una vez.
-
exports [ "scoreboard" ]:scoreboardAddColumn ( "id", root, 10, "id", 0 ) Try that.
-
No, there isn't such thing.
-
addEventHandler("onClientPlayerJoin",getLocalPlayer(),function() setTimer(spawn, 5000, 1) end) That part is useless, since "onClientPlayerJoin" is triggered for remote players only, not the person who joined, and "onClientResourceStart" is already doing what this event would do.
-
I don't know if it's stolen or not, but since it's already solved, I'm locking the topic.
-
getServerPort That's to get the port ( obviously ), but there's no function to get the IP.
-
Si, busca en: "s_main.lua": addEventHandler( "onPlayerWasted", g_root, function( ) fadeCamera( source, false, 4 ); setTimer( requestMenu, 5000, 1, source ); deleteAllPlayerBlips( source ) end ); Y quitale: setTimer( requestMenu, 5000, 1, source );
-
Crea un script nuevo y agregale esto: addEventHandler ( "onResourceStart", resourceRoot, function ( ) exports ["scoreboard" ]:scoreboardAddColumn ( "exp", root, 80, "experience" ) exports ["scoreboard" ]:scoreboardAddColumn ( "level" ) end )
-
local weapons = { { fileName = "Misil2", model = 359 } } function cargar ( ) for index, weapon in ipairs ( weapons ) do engineImportTXD ( engineLoadTXD ( weapon.fileName ..".txd", weapon.model ), weapon.model ) engineReplaceModel ( engineLoadDFF ( weapon.fileName ..".dff", weapon.model ), weapon.model ) end end addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) setTimer ( cargar, 5000, 1 ) end ) Estoy seguro de que el problema era ese "if" para verificar la version, ya no es necesario.
-
Tema movido a: "Ayuda relacionada al cliente/servidor".
-
Me dejo de funcionar - MTA
Castillo replied to Matty's topic in Ayuda relacionada al cliente/servidor
Tema movido a: "Ayuda relacionada al cliente/servidor". -
Maybe these ports are being used by another program?
-
Yes, it is in the table, model ID: 577
-
La funcion: getPlayerNametagColor obtiene el color del nick, pero no los colores HEX tipo: #FF0000
-
guiGridListSetItemColor ( Tabla, row, column, getPlayerNametagColor ( player ) )
-
You're welcome.
-
marker = getElementByID ( "random" ) autos = { 602, 545, 496, 517, 401, 410, 518, 600, 527, 436, 589, 580, 419, 439, 533, 549, 526, 491, 474, 445, 467, 604, 426, 507, 547, 585, 405, 587, 409, 466, 550, 492, 566, 546, 540, 551, 421, 516, 529, 592, 553, 577, 488, 511, 497, 548, 563, 512, 476, 593, 447, 425, 519, 520, 460, 417, 469, 487, 513, 581, 510, 509, 522, 481, 461, 462, 448, 521, 468, 463, 586, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 485, 552, 431, 438, 437, 574, 420, 525, 408, 416, 596, 433, 597, 427, 599, 490, 432, 528, 601, 407, 428, 544, 523, 470, 598, 499, 588, 609, 403, 498, 514, 524, 423, 532, 414, 578, 443, 486, 515, 406, 531, 573, 456, 455, 459, 543, 422, 583, 482, 478, 605, 554, 530, 418, 572, 582, 413, 440, 536, 575, 534, 567, 535, 576, 412, 402, 542, 603, 475, 449, 537, 538, 441, 464, 501, 465, 564, 568, 557, 424, 471, 504, 495, 457, 539, 483, 508, 571, 500, 444, 556, 429, 411, 541, 559, 415, 561, 480, 560, 562, 506, 565, 451, 434, 558, 494, 555, 502, 477, 503, 579, 400, 404, 489, 505, 479, 442, 458, 606, 607, 610, 590, 569, 611, 584, 608, 435, 450, 591, 594 } addEventHandler ( "onMarkerHit", root, function ( hitElement, matchingDimension ) if ( source == marker ) then local elV = getPedOccupiedVehicle ( hitElement ) if ( elV ) then setElementModel ( elV, autos [ math.random ( #autos ) ] ) end end end ) That's what you want?
-
Eso no tiene el menor sentido. Para ejecutar una funcion en un tiempo usa setTimer.
-
addEvent("cuenta", true) addEventHandler("cuenta", root, function ( username, password ) if ( password ~= "" and password ~= nil and username ~= "" and username ~= nil ) then if ( not getAccount ( username ) ) then local accountAdded = addAccount ( username, password ) if ( accountAdded ) then outputChatBox ( "Gracias " .. getPlayerName ( source ) .. ", Ya estas Registrado y loggeado", source ) local file = xmlCreateFile(username .." .xml","root") local node = xmlCreateChild(file,"stats") xmlNodeSetAttribute( node, "name", username ) local check = xmlNodeSetAttribute( node, "pass", password) xmlSaveFile(file) if file then outputChatBox ( "Tu Character se a creado con exito !.", source ) triggerClientEvent ( source, "closeLoginGUI", source ) logIn ( source, getAccount ( xmlNodeGetAttribute( node, "name" ), xmlNodeGetAttribute( node, "pass" ) ), xmlNodeGetAttribute( node, "pass" ) ) end else outputChatBox ( "Error creando la Cuenta por Favor contacta a un Admin.", source ) end else outputChatBox ( "Esta Cuenta Ya Existe..", source ) end else outputChatBox ( "Porfavor Pon tus datos Correctos.", source ) end end ) function loginHandler(username,password) if ( username ) then local acc = getAccount(username, password) if (acc) then logIn ( source, acc, password ) fadeCamera(source, true) setCameraTarget(source) triggerClientEvent ( source, "closeLoginGUI", source ) outputChatBox("Enjoy your time!", source) else outputChatBox("invalid username and password. Please re-connect and try again.", source) end end end addEvent("submitLoginEM",true) addEventHandler("submitLoginEM",root, loginHandler) addEvent("on:Visible:",true) addEventHandler("on:Visible:",root, function() local username = getPlayerName( source ) local file = xmlLoadFile( username .." .xml" ) if ( file ) then triggerClientEvent(source, "openLGUI", source) elseif not ( file ) then triggerClientEvent(source, "openRGUI", source) end end ) addEvent("archivo", true) addEventHandler("archivo", root, function( file ) local username = getPlayerName( source ) local file = xmlLoadFile( username .." .xml" ) end )
-
local marker = createMarker (1543.0826416016,-1678.3455810547,12.5,"cylinder",2,0,255,0,255) local marker2 = createMarker (1543.0826416016,-1678.3455810547,12.5,"cylinder",2,0,255,0,255) local skins = {"police 1", "police 2", "police 3", "police 4", "police 5", "police 6"} function createskinGui () window = guiCreateWindow(0.29,0.2117,0.3512,0.675,"police skins",true) skinsgrid = guiCreateGridList(0.0391,0.0938,0.9217,0.6222,true,window) guiGridListSetSelectionMode(skinsgrid,2) _skins = guiGridListAddColumn(skinsgrid,"Skins",0.-- s8) --> skibtn = guiCreateButton(0.242,0.7432,0.5338,0.0617,"take skin",true,window) closebtn = guiCreateButton(0.2456,0.8519,0.5302,0.0568,"Close",true,window) for index, skin in ipairs(skins) do local row = guiGridListAddRow (skinsgrid) guiGridListSetItemText ( skinsgrid, row, _skins, tostring(skin), false, false ) end end addEventHandler ( "onClientMarkerHit", marker, function ( hitElement ) if ( hitElement == localPlayer ) then createskinGui ( hitElement ) if ( window ~= nil ) then guiSetVisible ( window, true ) showCursor ( true ) guiSetInputEnabled ( true ) end end end ) addEventHandler("onClientGUIClick", root, function () if (source == skibtn) then local row,col = guiGridListGetSelectedItem(skinsgrid) if (row and col and row ~= -1 and col ~= -1) then local skinName = guiGridListGetItemText(skinsgrid, row, 1) if skinName == "police 1" then setElementModel(getLocalPlayer(), 280) elseif skinName == "police 2" then setElementModel(getLocalPlayer(),281) elseif skinName == "police 3" then setElementModel(getLocalPlayer(), 282) elseif skinName == "police 4" then setElementModel(getLocalPlayer(), 283) elseif skinName == "police 5" then setElementModel(getLocalPlayer(),284) elseif skinName == "police 6" then setElementModel(getLocalPlayer(), 288) end triggerEvent("closeWindow", localPlayer ) else outputChatBox("Please,select a skin of the list.",255,0,0) end elseif (source == closebtn) then triggerEvent("closeWindow", localPlayer ) end end ) addEventHandler("onClientMarkerLeave", marker, function ( leaveElement ) if ( leaveElement == localPlayer ) then triggerEvent("closeWindow", localPlayer ) end end ) addEvent("closeWindow", true) addEventHandler("closeWindow", root, function () guiSetVisible(window, false) showCursor(false) guiSetInputEnabled(false) end )