-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
You're welcome.
-
Have you tried obtaining it with the map editor?
-
triggerClientEvent has a sendTo argument, means that the event will be triggered for the element you put in there, if you don't fill it, it'll stay as default using "root" which is everything and everyone.
-
You could set if the player is VIP or not when he logs in using element data, then obtain it client side.
-
"thePlayer" is not defined and "source" is the colshape.
-
triggerClientEvent ( "Kust", root ) Change that to: triggerClientEvent ( hitElement, "Kust", hitElement )
-
That doesn't make any sense.
-
When exactly do you want to attach it?
-
Do you have the LOD model?
-
You must jail a player with the new writing method, else the data will obviously be the old one.
-
https://community.multitheftauto.com/in ... ls&id=3003
-
vehicleIDS = { 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 } function changeHandling ( ) for _, model in ipairs ( vehicleIDS ) do setModelHandling ( model, "tractionloss", 0.6 ) setModelHandling ( model, "tractionMultiplier", 0.6 ) end end addEventHandler ( "onResourceStart", resourceRoot, changeHandling )
-
GUIEditor = { window = {}, edit = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(178, 218, 641, 409, "Guia del server", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible ( GUIEditor.window[1], false ) GUIEditor.edit[1] = guiCreateEdit(9, 21, 588, 28, " Bienvenido al servidor", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(582, 28, 15, 132, "", false, GUIEditor.edit[1]) Guia_del_server = guiCreateEdit(6666, 52, 0, 20, "", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(10, 48, 583, 330, "Hola bienvenido al server,mientras que estas aqui no olvides divertirte y pasarla bien recuerda qué cada vez que mejoremos mejor sera tu divercion. \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />", false, GUIEditor.window[1]) end ) function gui ( ) local state = ( not guiGetVisible ( GUIEditor.window[1] ) ) guiSetVisible ( GUIEditor.window[1], state ) showCursor ( state ) end bindKey ( "f1", "down", gui )
-
Use this for writing: exports.logs:dbLog(thePlayer, 4, targetPlayer, "JAIL " .. duration) local r = getRealTime() local jailTime = ( r.timestamp + duration * 60 * 60 ) mysql:query_free("UPDATE characters SET jailtime='" ..jailTime.. "' WHERE id = " .. dbid) And this for loading: local result2 = mysql:query_fetch_assoc( "SELECT `jailtime` FROM `characters` WHERE `id`=" .. mysql:escape_string(dbid) ) local nn = tonumber(result2["jailtime"]) local currenttime = getRealTime().timestamp local timeLeft = ( currenttime - nn ) if ( timeLeft <= 0 ) then setElementFrozen(value, false) mysql:query_free("UPDATE characters SET jail='0' WHERE id = " .. dbid) mysql:query_free("UPDATE characters SET jailtime=NULL WHERE id = " .. dbid) outputChatBox("You are no longer in Jail!", value, 0, 255, 0) Lemme know if it works.
-
Are you storing when the player was jailed?
-
Does "duration" contain the seconds? or what is the value of it?
-
You can create a colshape around it, and when a player goes in, check if is a staff member, if not, kill him. Functions: createColRectangle getPlayerAccount getAccountName aclGetGroup isObjectInACLGroup killPed Event: onColShapeHit
-
Do you want this for a specified model or for all the vehicle models?
-
I guess you could use timestamps to do it.
-
You want to change the "tractionMultiplier" and "tranctionLoss" of all vehicle models to 0.6?
-
El script no necesita eso, ni lo incluye en su meta.xml.
-
Well, there's your problem "2013-12-14 19:03:14" is not a number, is an string, if you use tonumber, it'll return nil.
-
local result2 = mysql:query_fetch_assoc( "SELECT `jailtime` FROM `characters` WHERE `id`=" .. mysql:escape_string(dbid) ) outputChatBox ( "result2: ".. tostring ( result2 ) ) outputChatBox ( "result2 jailtime: ".. tostring ( result2 [ "jailtime" ] ) ) local nn = tonumber(result2["jailtime"]) local currenttime = getRealTime() local currenttimereal = ("%04d%02d%02d%02d%02d%02d"):format(currenttime.year+1900, currenttime.month + 1, currenttime.monthday, currenttime.hour,currenttime.minute, currenttime.second) local bb = tonumber(currenttimereal) if (nn) then setElementFrozen(value, false) mysql:query_free("UPDATE characters SET jail='0' WHERE id = " .. dbid) mysql:query_free("UPDATE characters SET jailtime=NULL WHERE id = " .. dbid) outputChatBox("You are no longer in Jail!", value, 0, 255, 0) Use that and see what it outputs.