Ich habe nun ein Anti-Spawnkill-Filterscript geschrieben, es treten aber einige Probleme auf:
- Der Gametext wird bei allen Usern angezeigt
- Alle User bekommen Spawnkillschutz
- Die Chatbubble wird iwie nicht angezeigt? Ô_o
Das ist mein Script soweit...
#include <a_samp>
forward sks(playerid);
forward cd4(playerid);
forward cd3(playerid);
forward cd2(playerid);
forward cd1(playerid);
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Spawnkillschutz by maddin911 ");
print("--------------------------------------\n");
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerChatBubble(playerid, "Spawn-Kill-Schutz aktiv!", 0xFF0000FF, 50.0, 5000);
SetTimer("sks", 5000, false);
SetPlayerHealth(playerid, 9999999999);
GameTextForPlayer(playerid, "~w~Spawn-Kill-Schutz: 5 Sekunden!", 1000, 4);
SetTimer("cd4", 1000, false);
}
public cd4(playerid)
{
GameTextForPlayer(playerid, "~w~Spawn-Kill-Schutz: 4 Sekunden!", 1000, 4);
SetTimer("cd3", 1000, false);
}
public cd3(playerid)
{
GameTextForPlayer(playerid, "~w~Spawn-Kill-Schutz: 3 Sekunden!", 1000, 4);
SetTimer("cd2", 1000, false);
}
public cd2(playerid)
{
GameTextForPlayer(playerid, "~w~Spawn-Kill-Schutz: 2 Sekunden!", 1000, 4);
SetTimer("cd1", 1000, false);
}
public cd1(playerid)
{
GameTextForPlayer(playerid, "~w~Spawn-Kill-Schutz: 1 Sekunde!", 1000, 4);
}
public sks(playerid)
{
SetPlayerHealth(playerid, 100);
}