@Above Post - Why are you sending him how to use
SetTimerEx? If you know what to do it's really simple how to create
Anti-Spawn Kill
@ScRipTeRiI used
SetPlayerChatBubble instead of
3DTextLabel they almost work the same.
pawn Код:
/*
================================[Parameters]================================
SetPlayerChatBubble(playerid, text[], color, Float:drawdistance, expiretime);
SetTimerEx(funcname[], interval, repeating, const format[], {Float,_}:...);
SetPlayerHealth(playerid, health);
SetPlayerArmour(playerid, armour);
*/
#define function::%0(%1) \
forward %0(%1); \
public %0(%1)
#define INFINITY_HP:AR \
999999
#define NORMAL_HP:AR \
100
public OnPlayerSpawn(playerid)
{
SetTimerEx( "OnAntiSpawnKill", 5000, false, "i", playerid ), SetPlayerChatBubble( playerid, "Anti spawn kill", 0xFF0000FF, 100.0, 50000 );
SetPlayerHealth( playerid, INFINITY_HP:AR ), SetPlayerArmour( playerid, INFINITY_HP:AR );
return true;
}
function:: OnAntiSpawnKill(playerid)
{
SetPlayerChatBubble( playerid, "Anti spawn kill ended", 0xFF0000FF, 100.0, 50000 );
SetPlayerHealth( playerid, NORMAL_HP:AR), SetPlayerArmour(playerid, NORMAL_HP:AR );
return true;
}
EDIT: Late but okay, we both have a different code, your choice which one to use :P