Which shows Win Messages in the form of Sprites but how about models instead if Sprite ?
check the code if it is correct or not :-
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Zombie Escape: Sprite On Hud"
#define VERSION "1.1"
#define AUTHOR "Raheem"
new g_ct_win[] = "models/zombie_escape/escapesuccess.mdl"
new g_t_win[] = "models/zombie_escape//escapefail.mdl"
new g_maxplayers
new tCount
new ctCount
native addPlayerSprite(id,Float:scale,Float:frameRate,szModel[],Float:fAngle, Float:fLen, Float:fTime,Float:fDistance , bool: bTransparent )
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
g_maxplayers = get_maxplayers()
}
public plugin_precache()
{
precache_model(g_ct_win)
precache_model(g_t_win)
}
public ze_roundend(id) {
tCount = GetPlayersNum(CsTeams:CS_TEAM_T)
ctCount = GetPlayersNum(CsTeams:CS_TEAM_CT)
static id
for (id = 1; id <= g_maxplayers; id++)
{
if(ctCount > tCount)
{
addPlayerSprite(id, 0.3, 50.0, g_ct_win, 20.0, 10.0, 3.0, 90.0, false)
}
else
{
addPlayerSprite(id, 0.3, 50.0, g_t_win, 20.0, 10.0, 3.0, 90.0, false)
}
}
}
stock GetPlayersNum(CsTeams:iTeam) {
new iNum;
for( new i = 1; i <= g_maxplayers; i++ ) {
if( is_user_connected(i) && is_user_alive(i) && cs_get_user_team(i) == iTeam )
iNum++;
}
return iNum;
}
Should I post this plugin if u give me the Permission ?