I'm trying to script in an ASSmod plugin for my server, but it doesn't seem to recognize the players ASSmod rank. :(
The idea is to;
restrict guest prop limit to 20.
restrict respected prop limit to 30 etc.
[code]
function PropRestrict(ply)
if (ply:HasLevel(ASS_LVL_BANNED)) and ply:GetCount ("props") == 10
then
Notify(ply, 1, 4, "You've hit the prop limit for previously banned!")
return false
end
if (ply:HasLevel(ASS_LVL_GUEST)) and ply:GetCount ("props") == 20
then
Notify(ply, 1, 4, "You've hit the prop limit for Guest!")
return false
end
if (ply:HasLevel(ASS_LVL_RESPECTED)) and ply:GetCount ("props") == 30
then
Notify(ply, 1, 4, "You've hit the prop limit for Respected!")
return false
end
if (ply:HasLevel(ASS_LVL_TEMPADMIN)) and ply:GetCount ("props") == 40
then
Notify(ply, 1, 4, "You've hit the prop limit for Temp Admin!")
return false
end
if (ply:HasLevel(ASS_LVL_ADMIN)) and ply:GetCount ("props") == 50
then
Notify(ply, 1, 4, "You've hit the prop limit for Admin!")
return false
end
if (ply:HasLevel(ASS_LVL_SUPER_ADMIN)) and ply:GetCount ("props") == 100
then
Notify(ply, 1, 4, "You've hit the prop limit for Super Admin!")
return false
end
if (ply:HasLevel(ASS_LVL_SERVER_OWNER)) and ply:GetCount ("props") == 100
then
Notify(ply, 1, 4, "You've hit the prop limit for Server Owner!")
return false
end
end
hook.Add("PlayerSpawnProp", "PropRestrict", PropRestrict)[/code]
It doesn't seem to recognize the players ASSmod rank. So guests, respected, tempadmin, admin, superadmin and serverowner all hit the previously banned prop limit which is 10.
Any tips?
Sorry, you need to Log In to post a reply to this thread.