I'm not 100% sure of the logic behind your plugin but to get which player is VIP you can use the below. You will need to include cstrike module.
PHP Code:
g_MaxPlayers = get_maxplayers();
public GetVIP()
{
for ( new i = 1 ; i <= g_MaxPlayers ; i++ )
{
if ( cs_get_user_vip(i) )
{
return i;
}
}
return 0;
}
__________________