Quote:
Originally Posted by Arbico
Try this code, And let me know if it works or not
Rep if it works please
PHP Code:
new Text3D:antispawnkill[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
SetPlayerHealth(playerid, 99999.0);
SetPlayerVirtualWorld(playerid, 0);
SendClientMessage(playerid, 0xFF0000AA, "You can't be killed for 5 second(s) (spawn protection)");
SetPlayerWantedLevel(playerid, 0);
SetTimerEx("AntiSpawnkill",PROTECTIONTIME*1500,0,"d",playerid);
antispawnkill[playerid] = Create3DTextLabel("Anti-Spawnkill Protected", 0xFF0000FF , 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(antispawnkill[playerid], playerid, 0.0, 0.0, 0.7);
}
public AntiSpawnkill(playerid)
{
Delete3DTextLabel(antispawnkill[playerid]); //SpawnKill TAG
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, 0x00ff00ff, "Anti Spawn kill protection over.");
return 1;
}
|
The same issue mention above persists expect in addition to it, your code will not delete old overlapped labels.