1LoL1 4 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) Share this post Link to post
Tomas 18 Posted February 10, 2015 function killz(source) killPed(source,source) end addCommandHandler("kill", killz) Share this post Link to post
SkatCh 0 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 Share this post Link to post
1LoL1 4 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) Share this post Link to post
SkatCh 0 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) Share this post Link to post
1LoL1 4 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: Share this post Link to post
SkatCh 0 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) Share this post Link to post
1LoL1 4 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. Share this post Link to post