Spawn protection
#5

@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
Reply


Messages In This Thread
Spawn protection - by ScRipTeRi - 19.12.2013, 18:54
Re : Spawn protection - by [HRD]Mar1 - 19.12.2013, 18:59
Re: Spawn protection - by [EnErGyS]KING - 19.12.2013, 19:02
Re: Spawn protection - by iOxide - 19.12.2013, 19:08
Re: Spawn protection - by Patrick - 19.12.2013, 19:08
Re: Spawn protection - by ScRipTeRi - 19.12.2013, 19:09

Forum Jump:


Users browsing this thread: 1 Guest(s)