Raised This Month: $51 Target: $400
 12% 

Solved model problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
generals
Senior Member
Join Date: Aug 2018
Old 09-09-2019 , 08:11   model problem
Reply With Quote #1

hi guys

i want to add model to end human

whats the problem?

i waiting for your help.. tnx

PHP Code:
#include <sourcemod>
#include <sdktools>

new Handle:hModel INVALID_HANDLE;

new 
String:model[256];

public 
OnPluginStart()
{
    
hModel CreateConVar("lh_model""models/player/bunny/bunny_funny.mdl");

    
HookEvent("round_end"Event_OnRoundEnd);
}

public 
OnMapStart()
{
    
GetConVarString(hModelmodelsizeof(model));
    
AddFileToDownloadsTable(model);
    
PrecacheModel(model);
}

public 
Event_OnRoundEnd(Handle:event, const String:name[], bool:silent)
{
    new 
CountPlayer 0Client 0;

    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && IsPlayerAlive(i))
        {
            
CountPlayer++;
            
Client i;
        }
    }

    if (
CountPlayer == && Client 0)
    {
        
SetEntityModel(Clientmodel);
    }


Last edited by generals; 09-23-2019 at 06:15.
generals is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode