Hi,
the following code is from Franc1sco's jail awards plugin. It offers the possibility to !revive for 6 credits. But spectators also can revive. I want to forbid this. How to do?
A little help would be nice
Code:
public Action:Resucitar(client,args)
{
if(client == 0)
{
PrintToServer("%t","Command is in-game only");
return;
}
if (!IsPlayerAlive(client))
{
if (g_iCredits[client] >= 6)
{
CS_RespawnPlayer(client);
g_iCredits[client] -= 6;
decl String:nombre[32];
GetClientName(client, nombre, sizeof(nombre));
PrintToChatAll("\x04[!awards] \x05Der Spieler\x03 %s \x05wurde wiederbelebt!", nombre);
PrintCenterTextAll("Spieler %s wurde wiederbelebt!", nombre);
}
else
{
PrintToChat(client, "\x04[!awards] \x05Deine Credits: %i (Du hast nicht genügend Credits, benötigt werden 6 Credits)", g_iCredits[client]);
}
}
else
{
PrintToChat(client, "\x04[!awards] \x05Du musst tot sein, um Dich wiederbeleben zu können!");
}
}
Best regards
2NASTY4U