How do i give more pwoer to certain groups in map vote (more power)

I use the map vote system by Willox ( http://forum.facepunch.com/showthread.php?t=1268353 ) and if you’re a admin/super admin your votes count as 2. I want donator votes to count as 2 also and i’m not sure how i would do this.

mapvote.lua: http://pastebin.com/L6NJhpej

Can you show us the cl_mapvote.lua as well?
Anyways, it depends on how your ranking system is set up, are you using usergroups?

It already does that.

The file you paste-binned. IsAdmin also counts IsSuperAdmin, you could do IsAdmin || IsSuperAdmin || IsDonator // for IsDonator check the group.

Here you see it already counts as 2 votes if has extra vote power
[lua] if(MapVote.HasExtraVotePower(v2)) then
map_results[v] = map_results[v] + 2
else
map_results[v] = map_results[v] + 1
end[/lua]

Example:

[lua]function MapVote.HasExtraVotePower( ply )
local _group = ply:GetNWString( “UserGroup” );

-- Example that gives admins more voting power
if ( ply:IsAdmin() || ply:IsSuperAdmin( ) || _group == "donator" ) then
	return true;
end

return false;

end[/lua]

If you look on the map vote system page, you can see that he says how to make extra power work

I don’t exactly understand what you’re trying to say i should do. The file i put on paste bin was /addons/mapvote/lua/autorun/mapvote.lua

this looks like the function that gives admins more voting power
[lua]function MapVote.HasExtraVotePower(ply)
– Example that gives admins more voting power
if ply:IsAdmin() then
return true
end[/lua]

Should i change it to this? I don’t think this is right though.
[lua]function MapVote.HasExtraVotePower(ply)
– Example that gives admins more voting power
if ply:IsAdmin() || ply:IsSuperAdmin || plyIsElite then
return true
end[/lua]

Close; but plyIsElite isn’t a function, the IsSuperAdmin doesn’t have ( ) on the end so that’ll be another error; etc.

If you’re using groups; then use the code I provided which will give admins, superadmins and group donator 2 votes per vote.

The code I posted:
[lua] if(MapVote.HasExtraVotePower(v2)) then
map_results[v] = map_results[v] + 2
else
map_results[v] = map_results[v] + 1
end[/lua]
Is showing you that 2 points are already given to those players when HasExtraVotePower returns true; the goal is to get it to return true for your donator group.

If you are using user-groups to designate your donator group, this would be the code to use.
[lua]function MapVote.HasExtraVotePower( ply )
local _group = ply:GetNWString( “UserGroup” );

-- Example that gives admins more voting power
if ( ply:IsAdmin() || ply:IsSuperAdmin( ) || _group == "donator" ) then
	return true;
end

return false;

end[/lua]

If you’re using a function, such as IsElite as your posted, you’d use this:
[lua]function MapVote.HasExtraVotePower( ply )
– Example that gives admins more voting power
if ( ply:IsAdmin() || ply:IsSuperAdmin( ) || ply:IsElite( ) ) then
return true;
end

return false;

end[/lua]

We really don’t have enough information on your side to give you a definite answer on what function or group to use. If you can share the files which set users to donator when they donate, we can tell you what to do.

My server is pretty new and i haven’t edited any of the map vote files so they’re all default right now.

Basically what i’m asking, if you didn’t understand from my first post, is how to make certain groups votes count as 2 votes (admins/superadmins votes have a star by their picture when they vote)

My donator rank’s name is “Elite” and i just manually give them the rank.

[lua]function MapVote.HasExtraVotePower( ply )
local _group = ply:GetNWString( “UserGroup” );

-- Example that gives admins more voting power
if ( ply:IsAdmin() || ply:IsSuperAdmin( ) || _group == "Elite" ) then
	return true;
end

return false;

end[/lua]

(sorry for late reply)
Thanks dude it works :smiley: