-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Post your spawners table.
-
local myGate1 = createObject ( 980, 1278.5, -1651.8000488281, 15.300000190735, 0, 0, 270 ) local marker = createMarker( -713.90002441406, 973.20001220703, 14, "cylinder", 10, 255, 255, 255, 0) addEventHandler ( "onMarkerHit", marker, function ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then if ( getElementData ( hitElement, "gang") == "SWAT" ) then moveObject ( myGate1, 2500, 1278.5, -1651.8000488281, 9.8000001907349 ) end end end ) addEventHandler ( "onMarkerLeave", marker, function ( leftElement ) if ( getElementType ( leftElement ) == "player" ) then if ( getElementData ( leftElement, "gang" ) == "SWAT" ) then moveObject ( myGate1, 2500, 1278.5, -1651.8000488281, 15.300000190735 ) end end end )
-
En esta linea? guiGridListSetItemText(members, row, mlist, getPlayerName(v), false, false) Es impossible, porque getPlayerName devuelve un string.
-
setAccountData ( getAccount ( "Console" ), "playerPeak", number )
-
Si, pero tenes que obtener el team del nombre usando la funcion que ya te dije antes.
-
He's talking about my gang system, which is not team based, so that obviously wouldn't work.
-
No, te dije getPlayersInTeam, no lees?
-
You're welcome.
-
There's no such thing as that, Annoy#.
-
Primero, tenes que crear una tabla global, luego, al tocar el marker, te fijas si el jugador ya esta en la tabla, y si no lo esta, lo agregas, luego, incrementas el valor guardado en la tabla cada ves que tocas un marker, y usas eso de index para obtener las coordenadas de la tabla tuya.
-
Entonces tenes que usar un for-loop con la tabla que devuelve getPlayersInTeam.
-
Yes, and also change your event name to: "onClientResourceStart".
-
'source' in your script is the marker you just hit, not the player that hit it.
-
After: g_dxGUI = { ranknum = dxText:create('1', screenWidth - 60, screenHeight - 95, false, 'bankgothic', 2, 'right'), ranksuffix = dxText:create('st', screenWidth - 40, screenHeight - 86, false, 'bankgothic', 1), checkpoint = dxText:create('0/0', screenWidth - 15, screenHeight - 54, false, 'bankgothic', 0.8, 'right'), timepassed = dxText:create('0:00:00', screenWidth - 10, screenHeight - 25, false, 'bankgothic', 0.7, 'right'), mapdisplay = dxText:create('Map: none', 2, screenHeight - dxGetFontHeight(0.7, 'bankgothic')/2, false, 'bankgothic', 0.7, 'left') } You can do: g_dxGUI['mapdisplay']:color ( 0, 255, 0, 255 )
-
Kind of useless, since the admin panel already has a system to edit the ACL. Still, good work.
-
Te lo dijo todo al reves, "team" en tu script es un string, supongo que el nombre de un team, lo que tenes que hacer es obtener el elemento del team usando: getTeamFromName Luego en guiGridListSetItemText, estas poniendo una tabla como texto, no creo que quieras hacer eso.
-
Me parece que mi pregunta fue muy obvia, te pregunto que es lo que la funcion "table.getn" devuelve.
-
Me parece que mi pregunta fue muy obvia, te pregunto que es lo que la funcion "table.getn" devuelve.
-
Skin mod: https://community.multitheftauto.com/in ... ls&id=6620 DONE
-
Que devuelve: "table.getn"?
-
Obviously client side.
-
local marker = createMarker( 1288.5, -1642.0999755859, 12.5, "Cylinder", 1.8, 0, 0, 255, 255) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,170,"SWAT Team ") guiSetVisible(windowjob, false) 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) function SWATjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) and getElementData ( localPlayer, "gang" ) == "SWAT" then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, SWATjob) function SWATjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SWATjobleave) function joinTeam() triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeTeam() triggerServerEvent("removeSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3] , removeTeam, false) function removeSWATWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSWATWindow, false)