Hi .. Was habe ich schon wieder falsch gemacht ? ...:/
Lua
function addNosAdminFunc ( playersource, cmd )
local playeracc = getPlayerAccount( playersource )
local accname = getAccountName( playeracc )
if (isObjectInACLGroup("user." ..accname, aclGetGroup("Moderator"))) or (isObjectInACLGroup("user." ..accname, aclGetGroup("SuperModerator"))) or (isObjectInACLGroup("user." ..accname, aclGetGroup("Admin"))) then
local id = 1100
if ( isPedInVehicle ( playersource ) ) then
local theVehicle = getPedOccupiedVehicle ( playersource )
local success = addVehicleUpgrade ( theVehicle, id )
if ( success ) then
outputChatBox("Nos has been added!",playersource,0,255,0)
else
outputChatBox("Failed to add Upgrade!",playersource,255,0,0)
end
else
outputChatBox("You must be in a Vehicle!",playersource,255,0,0)
end
end
end
addCommandHandler ( "addnos", addNosAdminFunc )
Alles anzeigen