Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. local explosiveWeaponIDS = { [ 16 ] = true, [ 19 ] = true, [ 39 ] = true, [ 51 ] = true } addEventHandler ( "onClientPlayerDamage", localPlayer, function ( _, weapon ) if ( explosiveWeaponIDS [ weapon ] ) then cancelEvent ( ) end end )
  2. You're checking if "WTF" is equal to pc1, not to "pc1".
  3. hum... weird. You are obviously using manve's, since he forgot to define 'msg'.
  4. Postea todo el script o enviamelo por PM.
  5. at "onPlayerWasted" event you forgot to define 'account', I've changed your script a bit: addEventHandler ( "onPlayerWasted", root, function ( ) local account = getPlayerAccount ( source ) if ( account and not isGuestAccount ( account ) ) then for slot = 1, 12 do setAccountData ( account, "save-wep".. slot, getPedWeapon ( source, slot ) ) setAccountData ( account, "save-ammo".. slot, getPedTotalAmmo ( source, slot ) ) end end end ) addEventHandler ( "onPlayerSpawn", root, function ( ) local account = getPlayerAccount ( source ) if ( account and not isGuestAccount ( account ) ) then setElementData ( source, "Occupation", occupation ) spawnPlayer ( source, x, y, z, interior, dimension ) setElementHealth ( source, health ) setElementModel ( source, skin ) setPlayerTeam ( source, getTeamFromName(team) ) setPlayerMoney ( source, money ) setPedArmor ( source, armor ) setPlayerWantedLevel ( source, wanted ) for slot = 1, 12 do local wep = getAccountData ( account, "save-wep".. slot ) local ammo = getAccountData ( account, "save-ammo".. slot ) giveWeapon ( source, wep, ammo ) end end end ) It works ( tested ).
  6. Si esta todo bien puesto, deberia funcionar.
  7. Latest version includes the function I posted above. Also, it would be the same thing.
  8. Copy the server side again, you had forgot to put 'root' at addEventHandler.
  9. Usa guiGridListClear y luego pone los teams de nuevo.
  10. What stops you from testing it?
  11. Primero: Quita uno de los 'localPlayer' de triggerServerEvent. Segundo: Te olvidaste de definir 'teamName' en al funcion 'borro'.
  12. Hold on, these .zip files are inside another resource? if so, then you can't load them.
  13. I don't understand, if these two are resource files, it should work.
  14. local resources = { "edos", "shootermcqueen" } function openNextMap ( ) local randomResource = resources [ math.random ( #resources ) ] if ( randomResource ) then outputDebugString ( "File opened! //random_maps.lua" ) startResource ( getResourceFromName ( randomResource ) ) else outputDebugString ( "Unable to open files - maps! //random_maps.lua" ) end end addEventHandler ( "onResourceStart", resourceRoot, openNextMap )
  15. function deteam ( ) local row, col = guiGridListGetSelectedItem ( teamList ) if ( row and col and row ~= -1 and col ~= -1 ) then local team = guiGridListGetItemText ( teamList, row, columnA ) triggerServerEvent ( "Move", localPlayer, localPlayer, team ) end end addEventHandler ( "onClientGUIClick", mover, deteam, false )
  16. Use: getResourceFromName startResource
  17. I'm not really sure what are you trying to do.
  18. You must create a new function, which will be executed infinity times with a timer every 10 minutes.
  19. Are you sure about that? because that looks like they are resources.
  20. You don't need to define the folder, nor the .zip, also, these are resource names or file names? because you need to specify the file name to open.
×
×
  • Create New...