-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
-- client side: -- GUI local resX,resY = guiGetScreenSize() local width,height = 422,217 local X = (resX/2) - (width/2) local Y = (resY/2) - (height/2) window = guiCreateWindow(X,Y,width,height,"Send A Message",false) guiWindowSetSizable(window,false) guiSetVisible(window,false) playerList = guiCreateGridList(10,25,403,109,false,window) guiGridListSetSelectionMode(playerList,2) column = guiGridListAddColumn(playerList,"Players",0.9) ed_msg = guiCreateEdit(89,138,320,38,"",false,window) btn_send = guiCreateButton(9,180,180,28,"Send!",false,window) btn_close = guiCreateButton(209,180,201,28,"Cancel",false,window) lbl_msg = guiCreateLabel(21,147,62,25,"Message:",false,window) guiSetProperty(btn_send,"HoverTextColour","ffffff000") guiSetProperty(btn_close,"HoverTextColour","fff000000") guiLabelSetColor(lbl_msg,0,255,0) guiSetFont(lbl_msg,"default-bold-small") guiEditSetMaxLength(ed_msg,80) -- Open GUI bindKey("h", "down", function ( ) guiSetVisible(window, not guiGetVisible ( window )) showCursor(guiGetVisible ( window )) if ( guiGetVisible ( window ) ) then guiGridListClear ( playerList ) if ( column ) then for id, player in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( playerList ) local r, g, b = getPlayerNametagColor ( player ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( player ), false, false ) guiGridListSetItemColor ( playerList, row, column, r, g, b ) end end end end ) -- Close Button addEventHandler("onClientGUIClick",btn_close, function () if (source == btn_close) then guiSetVisible(window, false) showCursor(false,false) end end ) -- Send function send ( ) local row, col = guiGridListGetSelectedItem ( playerList ) if ( row and col and row ~= -1 and col ~= -1 ) then local who = guiGridListGetItemText ( playerList, row, 1 ) local msg = tostring ( guiGetText ( ed_msg ) ) local playerWho = getPlayerFromName ( who ) if ( not playerWho ) then return outputChatBox ( "Player is no longer online." ) end if ( msg == "" ) then ouputChatBox ( "Error: You need to enter a message.",255,0,0 ) else triggerServerEvent ( "rog:sms:send", localPlayer, playerWho, msg ) outputChatBox ( "Message sent to ".. who, 0, 255, 255 ) end end end addEventHandler("onClientGUIClick",btn_send,send,false) -- server side: function recive ( player, msg ) outputChatBox ( "PM from: ".. getPlayerName ( source ) ..": ".. msg, player ) end addEvent ( "rog:sms:send", true ) addEventHandler ( "rog:sms:send", root, recive )
-
Yes, that's right. setElementHealth ( theVehicle, amount * 10 )
-
You'll have to edit gate maker, you can get the player gang with: exports [ "gang_system" ]:getPlayerGang ( player )
-
createTeam getPlayerAccount getAccountName isObjectInACLGroup I would use this with the onPlayerLogin event.
-
Get the position from each marker.
-
local iFPS = 0 local iFrames = 0 local iStartTick = getTickCount() function GetFPS( ) return iFPS end addEventHandler('onClientResourceStart', g_ResRoot, function() g_Players = getElementsByType('player') fadeCamera(false,0.0) -- create GUI local screenWidth, screenHeight = guiGetScreenSize() g_dxGUI = { ranknum = dxText:create('', screenWidth - 60, screenHeight - 95, false, 'bankgothic', 2, 'right'), ranksuffix = dxText:create('', screenWidth - 40, screenHeight - 86, false, 'bankgothic', 1), checkpoint = dxText:create('', 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('SPECTATORS: null', 2, screenHeight - dxGetFontHeight(2.3, 'bankgothic')/2, false, 'bankgothic', 0.55, 'left'), fpsdisplay = dxText:create('FPS: 0', 2, screenHeight - dxGetFontHeight(1.5, 'bankgothic')/2, false, 'bankgothic', 0.55, 'left'), mapdisplay = dxText:create('MAP: none', 2, screenHeight - dxGetFontHeight(0.7, 'bankgothic')/2, false, 'bankgothic', 0.55, 'left') } g_dxGUI.fpsdisplay:text(GetFPS()) addEventHandler( 'onClientRender', root, function() iFrames = iFrames + 1 if getTickCount() - iStartTick >= 1000 then iFPS = iFrames iFrames = 0 iStartTick = getTickCount() end g_dxGUI.fpsdisplay:text(GetFPS()) end ) Try it.
-
-- client side: GUIEditor = { window = {}, edit = {}, button = {}, } GUIEditor.window[1] = guiCreateWindow(0, 0, 763, 741, "Zombie Apocalypse Spawn Menu", true) guiWindowSetSizable(GUIEditor.window[1], true) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.edit[1] = guiCreateEdit(1008, 588, 322, 137, "Class Information:", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.edit[1], "NormalTextColour", "FFAB0000") guiEditSetReadOnly(GUIEditor.edit[1], true) GUIEditor.button[2] = guiCreateButton(152, 626, 455, 105, "Spawn", true, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "sa-gothic") guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) addEvent("showSpawnWindow", true) addEventHandler("showSpawnWindow", root, function() guiSetVisible(GUIEditor.window[1], true) showCursor(true) addEventHandler("onClientRender", root, showRender) end ) function showRender() dxDrawText("Class", 518, 99, 671, 144, tocolor(255, 255, 255, 255), 2, "pricedown", "left", "top", false, false, true, false, false) dxDrawText("", 615, 411, 618, 411, tocolor(255, 255, 255, 255), 2, "default", "left", "top", false, false, true, false, false) dxDrawText("Category", 51, 89, 255, 158, tocolor(255, 255, 255, 255), 2, "pricedown", "left", "top", false, false, true, false, false) dxDrawLine(391, 71, 391, 626, tocolor(255, 255, 255, 255), 1, true) end -- server side: addEventHandler ( "onPlayerLogin", root, function ( ) triggerClientEvent ( source, "showSpawnWindow", source ) end )
-
getDistanceBetweenPoints2D getDistanceBetweenPoints3D
-
Why don't you change the vehicle model instead of create a new one?
-
What do you mean by admin group?
-
Max vehicle health is 1000%.
-
Right click on the current tab, then click "parent", and then you can add tabs.
-
I already did, create a new folder and then create two files with the names I said above, then copy each content to each file.
-
You can use this simple script I made: http://www.mediafire.com/?lqq6gnd2hh8q54b
-
Sigo sin entender el problema de la camara.
-
addEventHandler ( "onClientPlayerWasted", localPlayer, function ( ) setTimer ( guiSetVisible, 3000, 1, ventana , true ) guiSetVisible ( spawn_button , true ) guiSetVisible ( info , true ) showCursor ( true ) end ) Que es lo que pasa con la camara?
-
Lo que necesitas es crear una tabla con las palabras prohibidas, luego al chatear ( onPlayerChat ), usa un for-loop para buscar en el texto que envio las palabras de la tabla, y si encontro una, mutea al jugador.
-
De nada.
-
'thePlayer' is not defined, and you got a missing 'end'. addEventHandler ( "onPlayerSpawn", root, function ( ) local team = getPlayerTeam ( source ) if ( team ) then local r, g, b = getTeamColor ( team ) setPlayerNametagColor ( source, r, g, b ) end end )
-
Tiene que ir dentro de la funcion, no fuera.
-
Al de crear el GUI obvio.
-
addEventHandler ( "onPlayerSpawn", root, function ( ) -- Code here end )