Hey there.
I'm trying to edit the plugin adminvote.sma, so basically what I want it to do is if staff member of the server made a vote and everybody voted, at last he/she will be asked to continue, if he/she declined, then there's a message will be printed saying Result Refused, and if he/she accepted, a message will be printed saying Result accepted.
So what I'm trying to do is when an admin makes a vote and he/she want's to continue, It will say
Result Accepted by Administrator %s
and if he/she wants to decline, it would say
Result Refused by Administrator %s
But the problem is I have an 2 extra staff ranks which are Golden and Silver Players.
and if they accepted or decline a vote, it would say
Result Accepted/Refused by GP/SP %s, %s should be the name of the staff member.
Here what I tried.
PHP Code:
public actionResult(id, key)
{
remove_task(4545454)
switch (key)
{
case 0:
{
set_task(2.0, "delayedExec", 0, g_Execute, g_execLen)
log_amx("Vote: %L", "en", "RES_ACCEPTED")
if(get_user_flags(id) & SILVER)
client_print(0, print_chat, "%L", LANG_PLAYER, "RES_ACCEPTED_S1")
else if(get_user_flags(id) & ADMIN)
client_print(0, print_chat, "%L", LANG_PLAYER, "RES_ACCEPTED_A1")
else if(get_user_flags(id) & GOLDEN)
client_print(0, print_chat, "%L", LANG_PLAYER, "RES_ACCEPTED"_G1)
}
case 1: autoRefuse()
}
return PLUGIN_HANDLED
}
Thank you