1LoL1 Posted February 10, 2015 Share Posted February 10, 2015 Why this script not work when my freeoam is off? function killz(source) setElementData(source, "health", 0) end addCommandHandler("kill", killz) Link to comment
Tomas Posted February 10, 2015 Share Posted February 10, 2015 function killz(source) killPed(source,source) end addCommandHandler("kill", killz) Link to comment
SkatCh Posted February 10, 2015 Share Posted February 10, 2015 You can use this : function killz ( source ) killPed ( source, source ) end addCommandHandler ( "kill",killz ) Sorry i didn't see Tomas post Link to comment
1LoL1 Posted February 10, 2015 Author Share Posted February 10, 2015 You can use this : function killz ( source ) killPed ( source, source ) end addCommandHandler ( "kill",killz ) Sorry i didn't see Tomas post And this? function killz(source) killPed(source,source) local accountName = getAccountName(getPlayerAccount(source)) if(accountName) then if(isObjectInACLGroup("user."..accountName, aclGetGroup("VIP"))) then else outputChatBox("You dont have VIP !", source, 255, 0, 0); end end end addCommandHandler("kill", killz) Link to comment
SkatCh Posted February 10, 2015 Share Posted February 10, 2015 What are you trying to do , you mean Only VIP player can use Kill command , if yes function killz(source) local acc = getPlayerAccount (source) local accountName = getAccountName(acc) if(accountName) then if(isObjectInACLGroup("user."..accountName, aclGetGroup("VIP"))) then killPed(source,source) else outputChatBox("You are not Vip you can't use this command", source, 255, 0, 0); end end end addCommandHandler("kill", killz) Link to comment
1LoL1 Posted February 10, 2015 Author Share Posted February 10, 2015 What are you trying to do , you mean Only VIP player can use Kill command , if yes function killz(source) local acc = getPlayerAccount (source) local accountName = getAccountName(acc) if(accountName) then if(isObjectInACLGroup("user."..accountName, aclGetGroup("VIP"))) then killPed(source,source) else outputChatBox("You are not Vip you can't use this command", source, 255, 0, 0); end end end addCommandHandler("kill", killz) yes but first warn when i dont have VIP and error: Link to comment
SkatCh Posted February 10, 2015 Share Posted February 10, 2015 -- Server side function killz(player) if not isElement (player) then return end local acc = getPlayerAccount(player) local accountName = getAccountName(acc) if(accountName) then if(isObjectInACLGroup("user."..accountName, aclGetGroup("VIP"))) then killPed(player,player) else outputChatBox("You are not Vip you can't use this command", player, 255, 0, 0) end end end addCommandHandler("kill", killz) Link to comment
1LoL1 Posted February 10, 2015 Author Share Posted February 10, 2015 -- Server side function killz(player) if not isElement (player) then return end local acc = getPlayerAccount(player) local accountName = getAccountName(acc) if(accountName) then if(isObjectInACLGroup("user."..accountName, aclGetGroup("VIP"))) then killPed(player,player) else outputChatBox("You are not Vip you can't use this command", player, 255, 0, 0) end end end addCommandHandler("kill", killz) Thank You Very Very much.. really thanks. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now