Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
public Action:Command_Say(client, args) { if(g_bEnabled && client && IsClientInGame(client)) { if(g_bRolled[client]) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_rolled"); else if(g_iTeam[client] <= CS_TEAM_SPECTATOR) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_spectate"); else if(!g_bAlive[client]) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_dead"); else if(g_iUsable != -1 && GetTime() > g_iUsable) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_disabled"); else if(KvGetNum(g_hKV_Abuse, g_sSteam[client], EFFECT_NONE)) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_abuse_apply"); else if(!g_bEnding) { if(GetRandomFloat(0.00, 1.00) < g_fFailure) { if(GetRandomFloat(0.00, 1.00) < g_fFailure) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_chance"); else { g_bRolled[client] = true; CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_failure"); for(new i = 1; i <= MaxClients; i++) if(i != client && IsClientInGame(i)) PrintToConsole(i, "%s%t", g_sPrefixConsole, "all_command_failure", g_sName[client]); } } else { g_bRolled[client] = true; Void_IssueEffect(client, g_iEffectArray[GetRandomInt(0, (g_iNumEffects - 1))]); } } return Plugin_Handled; } return Plugin_Continue; } |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
public Action:Command_Say(client, args) { if(g_bEnabled && client && IsClientInGame(client) && GetClientTeam(client) == CS_TEAM_T) { if(g_bRolled[client]) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_rolled"); else if(g_iTeam[client] <= CS_TEAM_SPECTATOR) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_spectate"); else if(!g_bAlive[client]) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_dead"); else if(g_iUsable != -1 && GetTime() > g_iUsable) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_disabled"); else if(KvGetNum(g_hKV_Abuse, g_sSteam[client], EFFECT_NONE)) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_abuse_apply"); else if(!g_bEnding) { if(GetRandomFloat(0.00, 1.00) < g_fFailure) { if(GetRandomFloat(0.00, 1.00) < g_fFailure) CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_chance"); else { g_bRolled[client] = true; CPrintToChat(client, "%s%t", g_sPrefixChat, "self_command_failure"); for(new i = 1; i <= MaxClients; i++) if(i != client && IsClientInGame(i)) PrintToConsole(i, "%s%t", g_sPrefixConsole, "all_command_failure", g_sName[client]); } } else { g_bRolled[client] = true; Void_IssueEffect(client, g_iEffectArray[GetRandomInt(0, (g_iNumEffects - 1))]); } } return Plugin_Handled; } return Plugin_Continue; } |