26.12.2013, 06:11
Hello, before i started this topic.. i want to tell you i was use the Fahad Zombie Gamemode from here.
And the problem is..
i want to set player health -10, if the TEAM_HUMAN entering TEAM_ZOMBIE base every 1sec.
its a simple function.. but not work..
here is the code..
and..
===============
And here is the enum,
---------------------------------
when i compiled the script it gave me this
Help would be greatly appreciated!
And the problem is..
i want to set player health -10, if the TEAM_HUMAN entering TEAM_ZOMBIE base every 1sec.
its a simple function.. but not work..
here is the code..
pawn Код:
forward HG();
public HG()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 7, Map[ZombieSpawnX], Map[ZombieSpawnY], Map[ZombieSpawnZ]))
{
if(GetPlayerTeam(i) == TEAM_ZOMBIE) return 0;
else
{
new Float:hp[MAX_PLAYERS];
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp - 10);
GameTextForPlayer(i,"~W~Be careful you are in\n~r~Zombie Spawn Area!! -10hp", 1000, 5);
}
}
}
}
return 1;
}
pawn Код:
SetTimer("HG",1000,1); // in OnGameModeInit
===============
And here is the enum,
pawn Код:
enum mapinfo
{
MapName[128],
FSMapName[128],
Float:HumanSpawnX,
Float:HumanSpawnY,
Float:HumanSpawnZ,
Float:HumanSpawn2X,
Float:HumanSpawn2Y,
Float:HumanSpawn2Z,
Float:ZombieSpawnX,
Float:ZombieSpawnY,
Float:ZombieSpawnZ,
Float:GateX,
Float:GateY,
Float:GateZ,
Float:GaterX,
Float:GaterY,
Float:GaterZ,
Float:CPx,
Float:CPy,
Float:CPz,
GateID,
MoveGate,
AllowWater,
Interior,
Weather,
Time,
EvacType,
IsStarted,
XPType,
};
---------------------------------
when i compiled the script it gave me this
Quote:
\gamemodes\zGM.pwn(979) : error 017: undefined symbol "playerid" \gamemodes\zGM.pwn(980) : error 017: undefined symbol "playerid" |
