29.09.2015, 13:31
Hello may I please get a hand whenever I attempt to compile I get this error
OnPlayerSpawn
OnPlayerSpawn in include
Please help me,also the identitations are correct but the forums messed them up.
Код:
include\rnpc.inc(539) : error 025: function heading differs from prototype
Код:
ApplyAnimation(playerid, "BOMBER", "null", 0, 0, 0, 0, 0, 1);
ApplyAnimation(playerid, "PED", "null", 0, 0, 0, 0, 0, 1);
if(IsPlayerNPC(playerid))
{
new spawn = random(sizeof(ZombieSpawns));
SetPlayerPos(playerid, ZombieSpawns[spawn][0], ZombieSpawns[spawn][1], ZombieSpawns[spawn][2]);
SetRNPCHealth(playerid, ZOMBIE_HEALTH);
SetPlayerSkin(playerid, ZOMBIE_SKIN);
SetPlayerColor(playerid, ZOMBIE_COLOR);
RNPC_SetShootable(playerid, 1);
RNPC_ToggleVehicleCollisionCheck(playerid, 1);
GetZombieVictimID[playerid] = INVALID_PLAYER_ID;
ZombiesAlive++;
ZombiesMax++;
return 1;
}
else
{
GetVictimDetectRange[playerid] = ZOMBIE_DETECT;
GetVictimTimerStatus[playerid] = 0;
}
Код:
public OnPlayerSpawn(playerid) {
if (IsPlayerRNPC(playerid)) {
rnpcData[playerid][RNPC_HEALTH] = 100.0;
rnpcData[playerid][RNPC_DEAD] = 0;
}
#if defined RNPC_OnPlayerSpawn
return RNPC_OnPlayerSpawn(playerid);
#else
return 1;
#endif
}
#if defined _ALS_OnPlayerSpawn
#undef OnPlayerSpawn
#else
#define _ALS_OnPlayerSpawn
#endif
#define OnPlayerSpawn RNPC_OnPlayerSpawn
forward RNPC_OnPlayerSpawn(playerid);

