04.04.2020, 21:51
Hi.
The following should work.
Animation is missing.
The following should work.
Code:
new Electric_Fence; #define FenceModelID 16868 //Change to preference public OnGameModeInit() { SetTimer("Check_Position", 1000, true); //Change to preference Electric_Fence = CreateObject(FenceModelID, xchange, ychange, zchange, 0.0, 0.0, 0.0); return 1; } forward Check_Position(); public Check_Position() { for (new i; i < GetPlayerPoolSize(); i++) { new Float: x,Float: y,Float: z; GetObjectPos(Electric_Fence,x,y,z); if (!IsPlayerInRangeOfPoint(i, 1.0, x, y, z)) // Change to preference { new Float:health; GetPlayerHealth(i, health); SetPlayerHealth(i, health-15); // Change to preference } } return 1; }