trying to fix npc, gave me errors.
Код:
(62) : error 017: undefined symbol "GetPlayerTargetPlayer"
(132) : error 017: undefined symbol "each"
132) : warning 202: number of arguments does not match definition
(132) : error 001: expected token: ",", but found "new"
(132) : error 001: expected token: ";", but found ")"
(132) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
Код:
forward PlayerStillAim(playerid, npcid);
public PlayerStillAim(playerid, npcid)
{
new targetplayer = GetPlayerTargetPlayer(playerid);
if (targetplayer != npcid)
{
FCNPC_SetSpecialAction(npcid, SPECIAL_ACTION_NONE);
ClearAnimations(npcid);
assaltante[npcid] = INVALID_PLAYER_ID;
KillTimer(timerrnpc[npcid]);
KillTimer(timerrnpc2[npcid]);
robdelay[npcid] = 1;
SetTimerEx("RNDelay", FAILROB_INTERVAL*1000, false, "i", npcid);
SetTimerEx("PlayerStillAim2", 100, false, "ii", playerid, npcid);
CallLocalFunction("OnPlayerFailRob", "ii", playerid, npcid);
}
}
Код:
stock PlayAlarm(npcid)
{
new Float: x, Float: y, Float: z;
GetPlayerPos(npcid, x, y, z);
each(Players->new i)
{
if (IsPlayerInRangeOfPointEx(i, 50.0, x, y, z, GetPlayerVirtualWorld(npcid)))
{
if (ratp == 0)
{
PlayerPlaySound(i, 3401, 0.0, 0.0, 0.0);
timerrplayer[i] = SetTimerEx("StopAlarmWhenIntChanged", 500, true, "ii", i, npcid);
} else if (ratp == 1) {
PlayerPlaySound(i, 3401, x, y, z);
timerrplayer[i] = SetTimerEx("StopAlarmWhenIntChanged", 500, true, "ii", i, npcid);
} else if (ratp == 2) {
PlayerPlaySound(i, 3401, 0.0, 0.0, 0.0);
timerrplayer[i] = SetTimerEx("StopAlarm", ALARM_STOP*1000, false, "i", i);
} else if (ratp == 3) {
PlayerPlaySound(i, 3401, x, y, z);
timerrplayer[i] = SetTimerEx("StopAlarm", ALARM_STOP*1000, false, "i", i);
} else if (ratp == 4) {
PlayerPlaySound(i, 3401, 0.0, 0.0, 0.0);
} else if (ratp == 5) {
PlayerPlaySound(i, 3401, x, y, z);
}
}
}
}