Najkon czy mógłbyś przerobić plugin, by tylko osoby z flagą "a" mogły jej użyć?
albo czy ktoś mógłby dla mnie przerobić tak ten plug?
public Action:Command_Say(client, args) {
if(client == 0 && !IsDedicatedServer())
client = 1;
if(client < 1 || GetConVarInt(sm_buy_relive_enabled) != 1)
return Plugin_Continue;
if(!GetAdminFlag(GetUserAdmin(client), Admin_Reservation)) {
decl String:command[32], String:value[32];
GetCmdArg(0, command, sizeof(command));
GetCmdArg(1, value, sizeof(value));
if(StrEqual(value, "relive") || StrEqual(value, "respawn") || StrEqual(value, "buyrespawn") || StrEqual(value, "buyrelive")) {
new team = GetClientTeam(client);
if(team != CS_TEAM_CT && team != CS_TEAM_T) {
PrintToChat(client, "[SM] Ta komenda nie jest dostepna dla obserwatorow");
return Plugin_Handled;
}
if(IsPlayerAlive(client)) {
PrintToChat(client, "[SM] Zycie jest krotkie, sprobuj pozniej");
return Plugin_Handled;
}
new cost = RoundToCeil(GetConVarFloat(sm_buy_relive_cost));
new money = GetEntProp(client, Prop_Send, "m_iAccount");
if(money < cost) {
PrintToChat(client, "[SM] Nie masz pieniedzy. Respawn kosztuje: %d$", cost);
return Plugin_Handled;
}
SetEntProp(client, Prop_Send, "m_iAccount", money - cost);
CS_RespawnPlayer(client);
return Plugin_Handled;
}
}
else {
PrintToChat(client, "[SM] Nie mozesz uzyc tej komendy!");
return Plugin_Handled;
}
return Plugin_Continue;
}