-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
You can change the model/texture of a vehicle, but when you enter, he'll enter like it's a car, you can't change that as far as I know. I don't understand the second question, are you asking if the player changed his skin models in gta3.img, if he can still play in MTA? if I'm right, he should be able to still.
-
Que se supone que haria eso? lo unico que veo es errores, intentas verificar si el skin es 0 para ver si el que dispara es el mismo que recive el daño...? function (attacker,attackerweapon,bodypart,loss) if attacker == source and loss > 1 then outputChatBox("Te estas disparando xD",source,255,0,0) end end addEventHandler("onPlayerDamage",getRootElement(),)
-
You are using MTA 1.1 I'm guessing, if so, I think you'll need to change the enconding to UTF-8 in the 'zombies' resource.
-
Pues, tienes que poner una restriccion en el script cada el tiempo que tu quieras.
-
TV = engineLoadTXD ( "skins/MILITAR.txd" ) engineImportTXD ( TV, 285 ) Con eso cambias la textura, y es lo maximo que podes cambiar por ahora.
-
/stats necesita el nombre de un jugador que yo sepa. el segundo error quiere decir que un cliente sin admin panel intento usar un evento que lo necesita, agregaste el recurso al acl.xml group "Admin"?
-
MTA:SA 1.1 Released: Harder, Better, Stronger, Faster
Castillo replied to darkdreamingdan's topic in News
Great work, when I get unsick, I'll check it out! -
"gui" tenia que ser una tabla, y en tu script no la tenes.
-
Es este todo tu script? si no, postea el resto.
-
Pone /debugscript 3 en el juego y postea los errores.
-
Nop, that won't work Axel, the 'for' loop is wrong. call(getResourceFromName("dxscoreboard"), "addScoreboardColumn", "wanted level") function check() for index, player in ipairs(getElementsByType("player")) do local wanted = getPlayerWantedLevel(player) setElementData(player,"Wanted level", tostring(wanted)) end setTimer(check, 10000, 0)
-
My script is ONLY server side, you can't use it's exported functions in the client side.
-
getAccountData has two required arguments, account, key name: example: local accountData = {} for index, account in ipairs(getAccounts()) do accountData[account] = getAccountData(account, "myData") end
-
Jaysd1, that's not the problem. local localPlayer = getLocalPlayer() local playerName = getPlayerName(localPlayer) function createPasswordWindow() windowChangepw = guiCreateWindow(0.3859,0.349,0.2219,0.1628,"[P-Login] - Change password",true) guiSetSize(windowChangepw, 165, 21) guiSetAlpha(windowChangepw,0.80000001192093) editOldpw = guiCreateEdit(110,29,165,21,"",false,windowChangepw) guiSetAlpha(editOldpw,1) guiEditSetMasked(editOldpw,true) labelOldpw = guiCreateLabel(10,29,90,21,"Old password:",false,windowChangepw) guiSetAlpha(labelOldpw,1) guiLabelSetColor(labelOldpw,255,255,255) guiLabelSetVerticalAlign(labelOldpw,"center") guiLabelSetHorizontalAlign(labelOldpw,"left",false) editNewpw = guiCreateEdit(110,60,165,21,"",false,windowChangepw) guiSetAlpha(editNewpw,1) guiEditSetMasked(editNewpw,true) guiEditSetMaxLength(editNewpw,50) labelNewpw = guiCreateLabel(10,60,90,21,"New password:",false,windowChangepw) guiSetAlpha(labelNewpw,1) guiLabelSetColor(labelNewpw,255,255,255) guiLabelSetVerticalAlign(labelNewpw,"center") guiLabelSetHorizontalAlign(labelNewpw,"left",false) buttonChangepw = guiCreateButton(10,91,265,23,"Change password",false,windowChangepw) guiSetAlpha(buttonChangepw,1) guiSetVisible(windowChangepw, false) addEventHandler("onClientGUIClick", buttonChangepw, clientSubmitChangepw, false) end function createLoginWindow() windowLogin = guiCreateWindow(0.3945,0.3646,0.2109,0.2018,"[P-Login]",true) guiSetSize(windowLogin, 270, 155, false) guiSetAlpha(windowLogin,1) labelUsername = guiCreateLabel(10,52,59,24,"Username:",false,windowLogin) guiSetAlpha(labelUsername,1) guiLabelSetColor(labelUsername,255,255,255) guiLabelSetVerticalAlign(labelUsername,"center") guiLabelSetHorizontalAlign(labelUsername,"left",false) labelPassword = guiCreateLabel(10,86,59,24,"Password:",false,windowLogin) guiLabelSetColor(labelPassword,255,255,255) guiLabelSetVerticalAlign(labelPassword,"center") guiLabelSetHorizontalAlign(labelPassword,"left",false) labelInfo = guiCreateLabel(10,26,250,17,"Please login or register.",false,windowLogin) guiSetAlpha(labelInfo,1) guiLabelSetColor(labelInfo,255,255,255) guiLabelSetVerticalAlign(labelInfo,"top") guiLabelSetHorizontalAlign(labelInfo,"center",false) guiSetFont(labelInfo,"default-bold-small") editUsername = guiCreateEdit(79,52,181,25,playerName,false,windowLogin) guiSetAlpha(editUsername,1) guiEditSetMaxLength(editUsername, 50) editPassword = guiCreateEdit(79,86,181,25,"",false,windowLogin) guiSetAlpha(editPassword,1) guiEditSetMasked(editPassword, true) guiEditSetMaxLength(editPassword, 50) buttonLogin = guiCreateButton(10,121,120,21,"Log in",false,windowLogin) guiSetAlpha(buttonLogin,1) buttonRegister = guiCreateButton(143,121,117,21,"Register",false,windowLogin) guiSetAlpha(buttonRegister,1) registerWindow = guiCreateWindow(500,500,500,500,"Registration",false,windowLogin) guiWindowSetSizable(windowMain,false) editRegistrationUsername = guiCreateEdit(98,138,242,25,"",false,registerWindow) editRegistrationPassword = guiCreateEdit(98,195,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationPassword,true) editRegistrationRepeatPassword = guiCreateEdit(99,252,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationRepeatPassword,true) Register = guiCreateLabel(24,24,391,97,"Register",false,registerWindow) guiLabelSetColor(lblRegister,0,85,255) guiLabelSetVerticalAlign(lblRegister,"center") guiLabelSetHorizontalAlign(lblRegister,"center",false) guiSetVisible(windowLogin, false) Username = guiCreateLabel(98,113,242,17,"Username:",false,registerWindow) guiLabelSetColor(lblRUsername,0,85,255) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") Username = guiCreateLabel(98,113,242,17,"Username:",false,registerWindow) guiLabelSetColor(Username,0,85,255) guiLabelSetVerticalAlign(Username,"center") guiLabelSetHorizontalAlign(Username,"center",false) guiSetFont(Username,"default-bold-small") RepeatPassword = guiCreateLabel(98,230,242,17,"Repeat password:",false,registerWindow) guiLabelSetColor(lblRepeatPassword,0,85,255) guiLabelSetVerticalAlign(RepeatPassword,"center") guiLabelSetHorizontalAlign(RepeatPassword,"center",false) guiSetFont(RepeatPassword,"default-bold-small") btnCancel = guiCreateButton(232,292,179,38,"Cancel",false,registerWindow) guiSetFont(btnCancel,"default-bold-small") btnConfirmRegistration = guiCreateButton(29,292,179,38,"Register!",false,registerWindow) guiSetFont(btnConfirmRegistration,"default-bold-small") guiSetVisible(registerWindow, false) guiSetInputEnabled(true) showCursor(true) addEventHandler("onClientGUIClick",btnLogin,onClickLogin) addEventHandler("onClientGUIClick",btnToggleRegister,onClickRegisterToggle) addEventHandler("onClientGUIClick",btnPlayAsGuest,onClickGuest) addEventHandler("onClientGUIClick",btnConfirmRegistration,onClickRegisterConfirm) addEventHandler("onClientGUIClick",btnCancel,onClickCancel) addEventHandler("onClientGUIClick", buttonLogin, clientSubmitLogin, false) addEventHandler("onClientGUIClick", buttonRegister, clientSubmitRegister, false) end Try that.
-
-- client side: GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} function gui() showCursor ( true ) GUIEditor_Window[1] = guiCreateWindow(380,328,425,274,"Army Ranger Tools",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,20,407,206,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("EMP",GUIEditor_TabPanel[1]) GUIEditor_Grid[1] = guiCreateGridList(3,4,164,175,false,GUIEditor_Tab[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.2) GUIEditor_Button[1] = guiCreateButton(171,11,93,36,"EMP Him",false,GUIEditor_Tab[1]) GUIEditor_Button[2] = guiCreateButton(171,54,93,35,"Spectate",false,GUIEditor_Tab[1]) GUIEditor_Label[1] = guiCreateLabel(271,58,116,31,"To check if right person",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Button[3] = guiCreateButton(171,92,93,35,"Refresh",false,GUIEditor_Tab[1]) GUIEditor_Label[2] = guiCreateLabel(268,96,120,29,"Refresh the playerlist",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",true) GUIEditor_Tab[2] = guiCreateTab("Equipment",GUIEditor_TabPanel[1]) GUIEditor_Button[4] = guiCreateButton(2,2,96,40,"Tazer",false,GUIEditor_Tab[2]) GUIEditor_Button[5] = guiCreateButton(102,3,96,40,"Parachute",false,GUIEditor_Tab[2]) GUIEditor_Button[6] = guiCreateButton(203,4,96,40,"Nightvision",false,GUIEditor_Tab[2]) GUIEditor_Button[7] = guiCreateButton(302,5,96,40,"Infrared",false,GUIEditor_Tab[2]) GUIEditor_Button[8] = guiCreateButton(2,47,96,40,"Nightstick",false,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("Others",GUIEditor_TabPanel[1]) GUIEditor_Grid[2] = guiCreateGridList(2,3,132,174,false,GUIEditor_Tab[3]) guiGridListSetSelectionMode(GUIEditor_Grid[2],2) guiGridListAddColumn(GUIEditor_Grid[2],"Players",0.2) GUIEditor_Button[9] = guiCreateButton(135,8,96,36,"Deport From A69",false,GUIEditor_Tab[3]) GUIEditor_Button[10] = guiCreateButton(16,233,393,32,"Close me",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick", GUIEditor_Button[3], findplayers, false) addEventHandler("onClientGUIClick", GUIEditor_Button[1], turnEngine, false) end addCommandHandler("tools", gui) function turnEngine() local row,col = guiGridListGetSelectedItem(GUIEditor_Grid[1]) if row and col and row ~= -1 and col ~= -1 then local playerName = guiGridListGetItemText(GUIEditor_Grid[1], row, col) local player = getPlayerFromName(playerName) if player then if isPedInVehicle(player) then triggerServerEvent("turnEngineOff",getLocalPlayer(),player) end end end end function findplayers() guiGridListClear ( GUIEditor_Grid[1] ) for index, player in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1] , row , 1 , getPlayerName ( player ) , false , false ) end end -- server side addEvent("turnEngineOff",true) addEventHandler("turnEngineOff",root, function (player) local vehicle = getPedOccupiedVehicle(player) setVehicleEngineState(vehicle, false) end) I haven't tested it.
-
policeVehicles = { [416]=true, [433]=true, [427]=true, [490]=true, [528]=true, [407]=true, [544]=true, [523]=true, [470]=true, [598]=true, [596]=true, [597]=true, [599]=true, [432]=true, [601]=true, [428]=true, [497]=true} function enterVehicle ( theVehicle, seat, jacked ) if ( not policeVehicles[getElementModel(theVehicle)] ) then blip = createBlipAttachedTo ( source, 55, 1 ) setBlipOrdering(blip, getBlipOrdering(blip) + 5) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), enterVehicle ) 'source' of onPlayerVehicleEnter is the player who entered the vehicle, you we're getting the model of the player, not of vehicle.
-
CapY, I won't sound rude but, what I get is that you want to make scripting stealing easier, there's no way to "guess" what was in the server side.
-
Holy shit, this is amazing indeed! good work mate!
-
Yes, there is, Roleplays usually are these that you have to play like you would in the real life.
-
If you could provide me $5000 billon dollars, I would be very greatefull.
-
-----Client side----------------------- addEventHandler("onClientResourceStart",resourceRoot, function () ----- Label -------- asdLabel = guiCreateLabel(0.7775,0.8217,0.1737,0.0367,"xD",true) guiLabelSetVerticalAlign(asdLabel,"center") guiLabelSetHorizontalAlign(asdLabel,"center",false) guiSetFont(asdLabel,"default-small") -------------Barra de progreso-------------- asdProgress = guiCreateProgressBar(0.7763,0.85,0.1775,0.04,true) end) Tu unico error era un 'end' de mas. P.D: No necesitas usar guiSetVisible(asdLabel,true) porque al crearlas, ya estaran visibles.
-
I've learnt without a "teacher", I just used the wiki and this forum, there are many examples in the wiki, if you really want to learn, you should spend some time there. P.S: You should learn some english, not all the wiki is translated to spanish https://wiki.multitheftauto.com/index.ph ... _Principal
-
Dude, you'd three posts without a reason, don't you know how to use the "EDIT" button? P.S: I told you to start learning from something EASIER.
