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;
}
SetTimer("HG",1000,1); // in OnGameModeInit
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,
};
\gamemodes\zGM.pwn(979) : error 017: undefined symbol "playerid" \gamemodes\zGM.pwn(980) : error 017: undefined symbol "playerid" |
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(i,hp);
SetPlayerHealth(i, hp - 10);
GameTextForPlayer(i,"~W~Be careful you are in\n~r~Zombie Spawn Area!! -10hp", 1000, 5);
}
}
}
}
return 1;
}
pawn Код:
|
C:\Users\Guest User\Music\zGM[Fahad]\zGM[Fahad]\zGM[Fahad]\gamemodes\zGM.pwn(979) : error 035: argument type mismatch (argument 2) C:\Users\Guest User\Music\zGM[Fahad]\zGM[Fahad]\zGM[Fahad]\gamemodes\zGM.pwn(980) : error 033: array must be indexed (variable "hp") |
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;
GetPlayerHealth(i,hp);
SetPlayerHealth(i, hp - 10);
GameTextForPlayer(i,"~W~Be careful you are in~n~~r~Zombie Spawn Area!! -10hp", 1000, 5);
}
}
}
}
return 1;
}