Jump to content

Not Work


1LoL1

Recommended Posts

Posted

Why this not work? :(

rootElement = getRootElement() 
function onPlayerSpawnHandler () 
    if(accountName) then 
        if(isObjectInACLGroup("user."..accountName, aclGetGroup("VIP"))) then 
        setPedArmor( source, 100 ) 
end 
  
addEventHandler( "onPlayerSpawn", rootElement, onPlayerSpawnHandler ) 

Posted

accountName sint defined, and you didnt end the if statements.

function onPlayerSpawnHandler () 
    local account = getPlayerAccount ( source ); 
    if ( not account or isGuestAccount ( account ) ) then  
        return false; 
    end 
     
    local accountName = getAccountName ( account ); 
    if ( accountName and isObjectInACLGroup ( "user."..accountName, aclGetGroup ( "VIP" ) ) ) then  
        setPedArmor ( source, 100 ); 
    end 
end 
addEventHandler( "onPlayerSpawn", root, onPlayerSpawnHandler ) 

Posted
accountName sint defined, and you didnt end the if statements.
function onPlayerSpawnHandler () 
    local account = getPlayerAccount ( source ); 
    if ( not account or isGuestAccount ( account ) ) then  
        return false; 
    end 
     
    local accountName = getAccountName ( account ); 
    if ( accountName and isObjectInACLGroup ( "user."..accountName, aclGetGroup ( "VIP" ) ) ) then  
        setPedArmor ( source, 100 ); 
    end 
end 
addEventHandler( "onPlayerSpawn", root, onPlayerSpawnHandler ) 

Error: ERROR: Loading script failed: test/test.lua:8: unexpected symbol near ")"

Posted

try this :

function onPlayerSpawnHandler () 
    local account = getPlayerAccount ( source ) 
         if ( not account or isGuestAccount ( account ) ) then return end 
         if ( isObjectInACLGroup ( "user." .. getAccountName (account) , aclGetGroup ( "VIP" ) ) ) then 
        setPedArmor ( source, 100 ) 
    end 
end 
addEventHandler( "onPlayerSpawn", root, onPlayerSpawnHandler ) 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
try this :
function onPlayerSpawnHandler () 
    local account = getPlayerAccount ( source ) 
         if ( not account or isGuestAccount ( account ) ) then return end 
         if ( isObjectInACLGroup ( "user." .. getAccountName (account) , aclGetGroup ( "VIP" ) ) ) then 
        setPedArmor ( source, 100 ) 
    end 
end 
addEventHandler( "onPlayerSpawn", root, onPlayerSpawnHandler ) 

Not work :( and 0 errors.

Posted
function onPlayerSoawnHandler(player) 
      local account = getPlayerAccount(player) 
              if (not account or isGuestAccount(account)) then return end 
              if (isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("VIP"))) then 
                  setPlayerArmor(player, 100) 
             end 
end 
addEventHandler("onPlayerSpawn", getRootElement(), onPlayerSpawnHandler) 

 

 

Posted
function onPlayerSoawnHandler(player) 
      local account = getPlayerAccount(player) 
              if (not account or isGuestAccount(account)) then return end 
              if (isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("VIP"))) then 
                  setPlayerArmor(player, 100) 
             end 
end 
addEventHandler("onPlayerSpawn", getRootElement(), onPlayerSpawnHandler) 

lol the source of this event is the player that just spawned.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
he can remove the player and place the source its the same think

no it's not

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
function onPlayerSoawnHandler(player) 
      local account = getPlayerAccount(player) 
              if (not account or isGuestAccount(account)) then return end 
              if (isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("VIP"))) then 
                  setPlayerArmor(player, 100) 
             end 
end 
addEventHandler("onPlayerSpawn", getRootElement(), onPlayerSpawnHandler) 

Not work and i dont have Gamemodes.. i have only setgamemode.

Posted
function onPlayerSpawnHandler() 
    local account = getPlayerAccount(source) 
    if (not account or isGuestAccount(account)) then return end 
    if (isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("VIP"))) then 
        setPlayerArmor(source, 100) 
    end 
end 
addEventHandler("onPlayerSpawn", getRootElement(), onPlayerSpawnHandler) 

it works. you need to creates ACL group called VIP

Inactivo.

Posted

tested and working :wink:

function onPlayerSpawnHandler() 
    local account = getPlayerAccount(source) 
    if (not account or isGuestAccount(account)) then return end 
    if (isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("VIP"))) then 
        setPlayerArmor(source, 100) 
    end 
end 
addEventHandler("onPlayerSpawn", getRootElement(), onPlayerSpawnHandler) 

 DUyJ810.gif

Posted
tested and working :wink:
function onPlayerSpawnHandler() 
    local account = getPlayerAccount(source) 
    if (not account or isGuestAccount(account)) then return end 
    if (isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("VIP"))) then 
        setPlayerArmor(source, 100) 
    end 
end 
addEventHandler("onPlayerSpawn", getRootElement(), onPlayerSpawnHandler) 

Thanks. Work :D

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...