При создании шипов:
PHP код:
new Float: p[3];
GetPlayerPos(playerid, p[0], p[1], p[2]);
SetPVarFloat(playerid, "X", p[0]);
SetPVarFloat(playerid, "Y", p[1]);
SetPVarFloat(playerid, "Z", p[2]);
SetPVarInt(playerid, "CreatedSpikes", 1);
В односекундный таймер (в цикл, при этом playerid заменяйте на i (если название переменной для цикла так названо)), либо в OnPlayerUpdate:
PHP код:
if(GetPVarInt(playerid, "CreatedSpikes") && !IsPlayerInRangeOfPoint(playerid, 50.0, GetPVarFloat(playerid, "X"), GetPVarFloat(playerid, "Y"), GetPVarFloat(playerid, "Z")) SendClientMessage(playerid, 0xFF0000FF, "Вы поставили шип, уберите его, или он уберется автоматически");
А при удалении шипов:
PHP код:
DeletePVar(playerid, "CreatedSpikes");