View Single Post
AndraX2000
Member
Join Date: Mar 2006
Location: 39°57' N 83°14' W
Old 03-27-2006 , 12:29   VIP issues
Reply With Quote #118

As it stands, the plugin doesn't bother to check for VIP status. If the VIP is in the ini, it will use whichever CT model is in the ini. 2 changes will be needed, the first is this:

Code:
public setModel (const params[]){

        new id = params[0] // playerid.
        new ind = params[1] // model index.
        new team = get_user_team(id) - 1

        if (cs_get_user_vip(id)) {
                cs_reset_user_model(id)
        }
        else if (team>=0 && team<2){

                if (ind== -2)
                        cs_reset_user_model(id)
                else if (ind ==-1)
                        cs_set_user_model (id,g_PrecachedList[g_BotsModel[team]])

                else {
                        cs_set_user_model (id,g_PrecachedList[g_ModelInfo[team][ind]])
                        #if DEBUG_MODE == 1
                        new playername[32]
                        get_user_name (id,playername,31)
                        format (logmsg,191,"%s%s<%s(%d)> HAS BEEN SET TO <%s>",DEBUG_MSG_LOG,"MODEL OF ",playername,id,g_PrecachedList[g_ModelInfo[team][ind]])
                        debugMsg (logmsg)
                        #endif
                }

        }
        g_ModelStatus[id] = 1

}
That will reset the model if the user becomes VIP. The problem is that setModel doesn't get called, because the player has not changed teams or been autobalanced. The quick solution is to comment out the part that checks if a user has changed, and that's what I'm doing right now.

I guess the other solution would be to do another register_logevent and look for "Became_VIP". The only problem with that is that the line only tells you who became VIP, not who was VIP previously, and both of them need model cahnges. It may be more trouble than it's worth, and so just removing the elegant checks may be better. I can't find any significant increase in processor time or delay when this is done.
AndraX2000 is offline