AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help With a plugin Jailbreak (https://forums.alliedmods.net/showthread.php?t=187709)

sasukebr 06-16-2012 20:21

Help With a plugin Jailbreak
 
[QUOTE]
someone help me with this plugin


#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {

register_plugin("Player live","1.0","SasukeBR")

public players_hud()
{
if(get_pcvar_num(cvar_showplayers))
{ "cvar_showplayers"}
g_guards = 0;
g_prisoners = 0;
for(new i = 0; i < g_max_clients; i++)
{
new id = i; g_max_clients;

if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
{
g_guards++;
}
else if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T)
{
g_prisoners++;
}
}
set_hudmessage(0, 255, 0, -1.0, 0.01)
show_hudmessage(0,"Prisoners: %i^nGuards: %i", g_guards, g_prisoners)
}
}

hornet 06-16-2012 21:42

Re: Help With a plugin Jailbreak
 
I've answered this for you before - You have braces out of place, missing your CVar pointer, a random line that has no purpose at all, haven't created your global variables, defining new variables in a loop, inefficient checks, and your function is never called.

If you want me to help you with this issue ... again ... then explain exactly how you want it to work.


All times are GMT -4. The time now is 06:19.

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