-
Posts
4,961 -
Joined
-
Last visited
Everything posted by Jaysds1
-
onClientSoundStarted is triggered by the functions: playSound and SetSoundPaused
-
try this: addEventHandler("onClientResourceStart", resourceRoot,function() local vehNames = {} for _, model in ipairs ( vehicleIDS ) do table.insert(vehNames,getVehicleNameFromModel(model)) end table.sort(vehNames) for _,name in ipairs(vehNames)do local items = guiComboBoxAddItem( seleccionVehicleBox,name) end end)
-
oh, ok Just learn lua more
-
try this: addCommandHandler ( "rank",function() for _,p in ipairs(getElementsByType("player"))do if exports.race:isPlayerFinished(p) then local rank = exports.race:getPlayerRank(p) local name = getPlayerName(p) if rank == 1 then outputChatBox("#ffffff1º "..name.." Winner!",root,0,0,0,true) elseif rank == 2 then outputChatBox("#ffffff1º "..name.." Second!",root,0,0,0,true) elseif rank == 3 then outputChatBox("#ffffff1º "..name.." Third!",root,0,0,0,true) end end end end) We needed to check if they're finished...
-
Read the quotes: addEventHandler ( "onPlayerSpawn",root,function() if getElementData( localPlayer, "MAX_Slots") == 8 then --2 '==' is needed setElementData( localPlayer, "M9 SD", 1) setElementData( localPlayer, "M9 SD Mag", 30) setElementData( localPlayer, "Map", 1) end end)--forgot end function checklife() local playerHealth = getElementHealth ( localPlayer ) if (playerHealth > 102 ) then banPlayer ( localPlayer, false, false, true, getRootElement (), 'reason ban' ) end setTimer(checklife, 2000, 0)--no quotes end addEventHandler ( "onPlayerSpawn", getRootElement(), checklife )
-
I'm not sure how to do that... Sorry
-
This looks awesome... Nice
-
sorry, try this: local 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 } addEventHandler("onClientResourceStart", resourceRoot,function() for _, model in ipairs ( vehicleIDS ) do local items = guiComboBoxAddItem( seleccionVehicleBox,getVehicleNameFromModel(model)) end end)
-
Make sure you have the url to the resources there. For an example: >[url=http://jworld137.com/resources/]http://jworld137.com/resources/[/url]> That would get any folders/resources in the 'resources' folder located on my site. (BTW, It wouldn't work if you try )
-
you could try using: setVehicleDamageProof
-
You need to create a combo box first using: guiCreateComboBox
-
try this: addEventHandler ( "onPlayerSpawn",root,function() if getElementData( localPlayer, "MAX_Slots") == 8 then --2 '==' is needed setElementData( localPlayer, "M9 SD", 1) setElementData( localPlayer, "M9 SD Mag", 30) setElementData( localPlayer, "Map", 1) end local playerHealth = getElementHealth ( localPlayer ) if playerHealth > 102 then banPlayer ( localPlayer, false, false, true, getRootElement (), 'reason ban' ) end end)
-
Download one of these: 1.3: http://code.google.com/p/mtasa-blue/dow ... e&can=2&q= 1.3.1: http://code.google.com/p/mtasa-blue/dow ... e&can=2&q= 1.4: http://code.google.com/p/mtasa-blue/dow ... e&can=2&q=
-
For me, it doesn't show the name... I think it's a bug... Here's what I got: addEventHandler("onClientPreRender",root,function() dxDrawText ( "#008000 HI", 0, 0, 0, 0, tocolor(255,255,255,255), 1, "default", "left", "top", false, false, false, true, false) dxDrawText ( "#008000 HI", 0, 20, 0, 0, tocolor(255,255,255,255), 1, "default", "left", "top", false, false, true, true, false) dxDrawText ( getPlayerName(localPlayer), 100, 100, 0, 0, tocolor(255,255,255,255), 1, "bankgothic", "center", "bottom", false, false, true, true, false) end) My name: #008000Jaysds1 EDIT1: After changing "bottom" to "top", it started showing, and it still shows white EDIT2: It ended up changing colors... Code: addEventHandler("onClientPreRender",root,function() dxDrawText ( "#008000 HI", 0, 0, 0, 0, tocolor(255,255,255,255), 1, "default", "left", "top", false, false, false, true, false) dxDrawText ( "#008000 HI", 0, 20, 0, 0, tocolor(255,255,255,255), 1, "default", "left", "top", false, false, true, true, false) dxDrawText ( getPlayerName(localPlayer), 0, 40, 0, 0, tocolor(255,255,255,255), 1, "default", "center", "top", false, false, true, true, false) dxDrawText ( getPlayerName(localPlayer), 0, 60, 0, 0, tocolor(255,255,255,255), 1, "bankgothic", "left", "top", false, false, true, true, false) dxDrawText ( getPlayerName(localPlayer), 0, 80, 0, 0, tocolor(255,255,255,255), 1, "bankgothic", "center", "top", false, false, true, true, false) end)
-
try this: addCommandHandler ( "rank",function(source) --source is the player who entered the command for _,p in ipairs(getElementsByType("player"))do local rank = exports.race:getPlayerRank(p) local name = getPlayerName(p) if rank == 1 then outputChatBox("#ffffff1º "..name.." Winner!",root,0,0,0,true) elseif rank == 2 then outputChatBox("#ffffff1º "..name.." Second!",root,0,0,0,true) elseif rank == 3 then outputChatBox("#ffffff1º "..name.." Third!",root,0,0,0,true) end end end)
-
hmmm, it should work, because everything looks perfect... Maybe it's the HEX name, try outputting the player's name before drawing it.
-
Like I said, there's no source for command handler's... Line 10: if source == getResourceRootElement( getThisResource() ) then
-
np, and sorry for the late reply, I was at school
-
WHAT EVER!!! I didn't say you can't/shouldn't use next the problem was the ' : '.
-
try this again please: Client: local marker = createMarker( 1288.7602539063, -1642.1657714844, 12.5, "Cylinder", 1.4, 0, 0, 255, 255) local GUIEditor_Button = {} local GUIEditor_Memo = {} local GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end local windowjob = guiMyCwindow(301,170,"[sGN] SWAT Team ") GUIEditor_Button[1] = guiCreateButton(22,80,108,35,"Take job",false,windowjob) GUIEditor_Button[3] = guiCreateButton(22,120,108,35,"Quit Job",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,120,110,36,"Cancel",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(19,33,273,20,"Are you sure you want to take/leave this job?",false,windowjob) guiSetVisible(windowjob, false) addEventHandler("onClientMarkerHit",marker,function(ele) if getElementType(ele)~="player"then return end local pTeam = getPlayerTeam(ele) if pTeam and getTeamName(pTeam)~="SWAT"then guiSetVisible(windowjob, true) showCursor(true) end end) addEventHandler("onClientMarkerLeave", marker, function(ele) if getElementType(ele)~='player'then return end guiSetVisible(windowjob, false) showCursor(false) end) addEventHandler("onClientGUIClick",guiRoot,function() if source==GUIEditor_Button[1]then triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) elseif source==GUIEditor_Button[2]then guiSetVisible(windowjob, false) showCursor(false) elseif source==GUIEditor_Button[3]then triggerServerEvent("removeSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end end,true)
-
Sorry, but I don't know what you're trying to do 1. command handlers don't have a "source"
-
Copy the client code again please, and try it
-
try this: addCommandHandler("specs",function(thePlayer) if not isPedInVehicle(thePlayer)then return end local pVeh = getPedOccupiedVehicle(thePlayer) local sirenData = getVehicleSirens(pVeh) local parm = getVehicleSirenParams(pVeh) if not sirenData or not parm then return end local int = parm.SirenCount for i = 0,int do outputChatBox("setVehicleSirens(getPedOccupiedVehicle(thePlayer),"..i..","..tostring(sirenData[i][4])..","..tostring(sirenData[i][5])..","..tostring(sirenData[i][6])..","..tostring(sirenData[i][1])..","..tostring(sirenData[i][2])..","..tostring(sirenData[i][3])..")") end end)