Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Use the following functions: getPlayerAccount getAccountName aclGetGroup isObjectInACLGroup
  2. Are you sure that none of your scripts is removing the data somehow? does it happen to the team from the player that left the server?
  3. 'source' is not defined at "payTheTicket" function.
  4. You are setting the data to the team element and not the player?
  5. You are binding the key to the same function that binds the key in the first place, it makes no sense.
  6. What's the point on using string.format? you can simply do: "user.".. getAccountName ( getPlayerAccount ( player ) ) @RoRo76: Try this: local gate = createObject ( 10828, -1570.5, 1117.5, 16.10000038147, 0, 0, 91.988525390625 ) local state = false addCommandHandler ( "gate", function ( thePlayer ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Admin" ) ) then if ( not state ) then moveObject ( gate, 3000, -1570.5, 1117.5, 30.2, 0, 0, 0 ) else moveObject ( gate, 3000, -1570.5, 1117.5, 16.10000038147, 0, 0, 0 ) end state = ( not state ) end end )
  7. You must use the following functions: getPlayerAccount -- Gets the account element of a player. getAccountName -- Gets the name of an account element. aclGetGroup -- Gets the ACL group from it's name. isObjectInACLGroup -- Checks if an object is in the ACL group.
  8. marker5 = createMarker( 1288.17566, -1641.94141, 12.54688, "Cylinder", 1, 0, 0, 255, 200) pedi = createPed ( 285, 1288.17566, -1641.94141, 13.54688, 270) blipA = createBlip ( 1288.17566, -1641.94141, 13.54688, 58, 2, 255, 0,0, 255) function panel(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then local playerTeam = getPlayerTeam ( localPlayer ) if ( playerTeam ) then local oldTeamName = getTeamName ( playerTeam ) if ( oldTeamName ~= "SWAT" ) then panel = guiCreateWindow(443, 132, 416, 514, "S.W.A.T Job", false) guiWindowSetSizable(panel, false) aceptar = guiCreateButton(16, 282, 169, 72, "Accept", false, panel) cerrar = guiCreateButton(230, 282, 169, 72, "Close", false, panel) memo = guiCreateMemo(12, 26, 382, 238, "Welcome to the SWAT Job Accept this job if you are an SWAT\nIf you aren't a swat You cannot accept this Job.", false, panel) showCursor (true) addEventHandler ("onClientGUIClick", aceptar, aceptarr, false ) addEventHandler ("onClientGUIClick", cerrar, cerrarr, false ) guiMemoSetReadOnly(memo, true) end end end end addEventHandler("onClientMarkerHit", marker5, panel ) function aceptarr ( thePlayer ) triggerServerEvent ( "onGreeting", localPlayer) guiSetVisible ( panel, false ) showCursor(false) end function cerrarr ( hitElement ) guiSetVisible ( panel, false ) showCursor(false) end
  9. El problema con los zip es si es un recurso con un archivo al que queres editar, por ejemplo, un archivo XML con datos y lo querias modificar desde el recurso, si esta en zip no podras hacerlo.
  10. Y cual seria la linea 443 en ese pedazo de codigo?
  11. Get the player team and see if it's SWAT or not. getPlayerTeam getTeamName
  12. You must create the team once, then get it from it's name. createTeam ( "SWAT", 0, 0, 255 ) function aceptarr ( ) local theTeam = getTeamFromName ( "SWAT" ) if ( theTeam ) then setPlayerTeam ( source, theTeam ) setPlayerNametagColor ( source, 0, 0, 255 ) setElementModel ( source, 285 ) giveWeapon ( source, 31, 550 ) giveWeapon ( source, 23, 550 ) giveWeapon ( source, 3, 550 ) giveWeapon ( source, 29, 550 ) giveWeapon ( source, 46, 550 ) giveWeapon ( source, 41, 5000 ) end end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", root, aceptarr )
  13. Move the bindKey after the "sendClientMessage". P.S: You put "Press H" in the message, but the key is binded to "N".
  14. Just so you know, I changed it to obtain the value from the column 2, I guess the value "col" was 1. You're welcome.
  15. En lugar de que obtenga el dinero del jugador pones 10.
  16. function loadHandler(button, state) if button == "left" and state == "up" then local row, col = guiGridListGetSelectedItem(glistLoadList) if ( row and col and row ~= -1 and col ~=-1 ) then local data = guiGridListGetItemData(glistLoadList, row, 2) local startx, starty, startz, endx, endy, endz, cash = unpack(data) triggerEvent("startLoad", localPlayer, startx, starty, startz, endx, endy, endz, cash) end end end function beginLoad(startx, starty, startz, endx, endy, endz, cash) createMarker(startx, starty, startz, "checkpoint", 5) createBlip(-102, -70, 5, 0, 2, 0, 0, 255) end addEvent("startLoad", false) addEventHandler("startLoad", localPlayer, beginLoad) Try it.
  17. 1: You must check if the wanted level of the player is below 2. function onPlayerDamage ( attacker ) if isPlayerInTeam ( source, "Police" ) then if ( getElementType ( attacker ) == "player" and getElementModel ( source ) == 280 ) and ( getPlayerWantedLevel ( attacker ) < 2 ) then setPlayerWantedLevel ( attacker, 2 ) end end end addEventHandler ( "onPlayerDamage", getRootElement(), onPlayerDamage ) 2: The first argument of "onPlayerWasted" is the total ammo, the second is the killer. function onPlayerWasted ( _, attacker ) if isPlayerInTeam ( source, "Police" ) then if ( getElementType ( attacker ) == "player" ) then if ( attacker ~= source ) then setPlayerWantedLevel ( attacker, getPlayerWantedLevel ( attacker ) + 1 ) end end end end addEventHandler ( "onPlayerWasted", getRootElement(), onPlayerWasted )
  18. Show me the part where you set this data.
  19. Cancel the onClientPedDamage event.
  20. Castillo

    solved

    I killed a player and got reputation status "good1", then I killed another and my reputation status went back to "normal".
×
×
  • Create New...