Jump to content

Predator

Members
  • Posts

    18
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Predator's Achievements

Square

Square (6/54)

0

Reputation

  1. Dunno what's its problem but my color is random with yours..
  2. Castillo's works.. Kenix's doesn't give me any errors but neither my color is black.. Thank you all for your help.
  3. When trying Kenix's I get the error: WARNING: customblips\admin.Lua:28: Bad argument @ 'destroyElement' When trying myonlake's I get the error: SCRIPT ERROR: customblips\admin.Lua:4: '<' expected near 'createBlipAttachedTo'
  4. Hi all, I'm trying to make a script that when an Admin spawns his blip color gets black, and when he dies/quits it(the blip) destroys.. My script: addEventHandler ( "onPlayerSpawn", getRootElement(),createBlipAttachedTo ) function createBlipAttachedTo local account = getPlayerAccount(source) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then if isElement ( playerBlips[source] ) then destroyElement ( playerBlips[source] ) end playerBlips[source] = createBlip ( 0, 2, 0, 0, 0, 255, 0, 99999.0, 0 ) attachElements ( playerBlips[source], source ) end end addEventHandler ( "onPlayerQuit", getRootElement(), function() destroyElement ( playerBlips[source] ) playerBlips[source] = nil end addEventHandler ( "onPlayerWasted", getRootElement(), function() destroyElement ( playerBlips[source] ) playerBlips[source] = nil end But it doesn't work.. Error: SCRIPT ERROR: customblips\Admin.lua:3: '<' expected near 'if' Anyone can help? Thanks in advance
  5. Thank you all guys! It works just fine, than you for helping.
  6. Predator

    setPedArmor

    Hi everyone, I have made a really simple script that spawns every player with armour, but it doesn't work and I don't know what's wrong.. function setPedArmor ( player, onPlayerSpawn ) setPedArmor ( player, 100 ) end addEventHandler ( "onPlayerSpawn", givePlayerArmor ) Anyone could help?
  7. Hmm, I see my fault, thank you for the advise, and for the help with the script.
  8. Ty a lot! It works! I want to ask something other too.. I tryied to do the same for stats but it kinda failed, could you fix it ? local stats = { ["DanWesson"] = {[69] = 1000, [70] = 1000, [71] = 1000, [72] = 1000, [73] = 1000, [74] = 1000, [75] = 1000, [76] = 1000, [77] = 1000, [78] = 1000, [79] = 1000, [160] = 1000}, } function changePedStat ( theSpawnpoint, theTeam ) local account = getPlayerAccount(source) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "DanWesson" ) ) ) then for stat, value in pairs(stat["DanWesson"]) do setPedstat(source, stat, value, true) end end end addEventHandler ( "onPlayerSpawn", getRootElement(), setPedStat )
  9. So, here's my problem: I wan't to make a script so a player spawns with guns depending on witch ACL group he's in. I have made this script, but it doesn't work.. function giveWeaponsOnSpawn ( theSpawnpoint, theTeam ) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then giveWeapon ( source, 1, 9999 ) giveWeapon ( source, 4, 9999 ) giveWeapon ( source, 24, 9999 ) giveWeapon ( source, 27, 9999 ) giveWeapon ( source, 32, 9999 ) giveWeapon ( source, 31, 9999 ) giveWeapon ( source, 34, 9999 ) giveWeapon ( source, 36, 9999 ) giveWeapon ( source, 39, 9999 ) giveWeapon ( source, 40, 9999 ) giveWeapon ( source, 44, 9999 ) giveWeapon ( source, 46, 9999 ) end end addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeaponsOnSpawn ) When I remove all that ACL group thing the script works just fine, but when i try to add the ACL thing, I get an error: WARNING: spawnweps\DW.lua:2: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] If anyone could help me with that I would really appreciate it
  10. Predator

    Spawn help

    WOW! Works! Thank you a lot! You made me really happy : )
  11. Predator

    Spawn help

    Wow! Thanks! Works like a charm... But, if someone can make it that when a player(guest, not logged in) joins, he spawns at ( player, -702.6533203125, 962.88671875, 12.393084526062, 90, 293, 0, 0 ), and when he logs in he dies, I would really appreciate it : ) Once again the script that worked: addEventHandler( "onResourceStart", resourceRoot, function() resetMapInfo() for _,player in ipairs( getElementsByType 'player' ) do spawn( player ) end end ) function spawn( player ) if not isElement( player ) then return end showChat( player, true ) local acc = getPlayerAccount( player ) if acc and not isGuestAccount( acc ) then if isObjectInACLGroup ( "user.".. getAccountName( acc ), aclGetGroup ( "DanWesson" ) ) then spawnPlayer ( player, -49.161193847656, -225.46385192871, 5.4296875, 90, 287, 0, 0 ) elseif isObjectInACLGroup ( "user.".. getAccountName( acc ), aclGetGroup ( "SWAT" ) ) then spawnPlayer ( player, -550.86010742188, 2594.9943847656, 53.93478012085, 90, 285, 0, 0 ) elseif isObjectInACLGroup ( "user.".. getAccountName( acc ), aclGetGroup ( "GBO" ) ) then spawnPlayer ( player, 1058.5606689453, 1279.9813232422, 10.8203125, 90, 120, 0, 0 ) end else outputChatBox( 'You are not logged in!' ) end fadeCamera( player, true ) setCameraTarget( player, player ) end addEventHandler( "onPlayerJoin", root, function( ) spawn( source ) end) addEventHandler( "onPlayerWasted", root, function( ) setTimer( spawn, 1800, 1, source ) end)
  12. Predator

    Spawn help

    Well, I don't see any erros, but still it doesn't work.. The only I see when typing /debugscript 3 is this: INFO: votemanager recreate GuiElemens INFO: modloader client: Finished downloading, requesting server for mods INFO: modloader client: Replacing mods! #vehicles:4 | #weapons:0 | #skins:0
  13. Predator

    Spawn help

    Still, the same shit happens.. Also what should I do with that /debugscript3 ? If you mean just type it in chat while logged in asw admin, still nothing changes..
  14. Predator

    Spawn help

    Still, the same thing happens..
  15. Predator

    Spawn help

    No, what currently happens is that when I die I see my dead body, the map, and the camera doing some movements getting away from the body, when i choose a location, I just spawn there..
×
×
  • Create New...