[Include] Cops
#11

Quote:
Originally Posted by Pottus
Посмотреть сообщение
fixed all of these except those:

Major fuck-up here.
Код:
public FCNPC_OnUpdate(npcid)
{
    new Float:x, Float:y, Float:z;
    for(new k = 0; k < MAX_COPS; k++)
    {
I don't even see npcid used at all, you are basically using this callback like a timer! That means you are doing as many times more work as the number of cops that are spawned!

Why bother doing anything until you check if the killerid is an NPC?
Код:
public OnPlayerDeath(playerid, killerid, reason)
1. e_cops[npcid][copid] could be invalid cop, or maybe i got you wrong
2. i check if killer is player then call crime_kill if cop npc killed player i call oncopkillplayer
Reply


Messages In This Thread
Cops AI - by Lokii - 23.01.2019, 15:00
Re: Cops - by Pottus - 23.01.2019, 15:34
Re: Cops - by Lokii - 23.01.2019, 15:51
Re: Cops - by Hazon - 23.01.2019, 18:27
Re: Cops - by Lokii - 23.01.2019, 18:45
Re: Cops - by Lucky13 - 23.01.2019, 19:27
Re: Cops - by Lokii - 23.01.2019, 19:28
Re: Cops - by N0FeaR - 23.01.2019, 20:24
Re: Cops - by Lokii - 23.01.2019, 20:27
Re: Cops - by Pottus - 24.01.2019, 18:05
Re: Cops - by Lokii - 25.01.2019, 15:53
Re: Cops - by codExpert - 25.01.2019, 16:01
Re: Cops - by Lokii - 25.01.2019, 16:05
Re: Cops - by Pottus - 25.01.2019, 20:26
Re: Cops - by Lokii - 25.01.2019, 20:33
Re: Cops - by Lokii - 28.01.2019, 12:55

Forum Jump:


Users browsing this thread: 1 Guest(s)