16.03.2018, 01:49
Код:
public OnZombieRoam() { for(new npcid = 0; npcid < MAX_ZOMBIES; npcid++) { if(IsPlayerNPC(npcid)) { if(GetRNPCHealth(npcid) > 0) { new victim = GetZombieVictim(npcid), Float:x, Float:y, Float:z; GetPlayerPos(npcid, x, y, z); if(victim == INVALID_PLAYER_ID) { new pos = random(4); if(pos == 0) { x = x + 100.0; } else if(pos == 1) { x = x - 100.0; } else if(pos == 2) { y = y + 100.0; } else if(pos == 3) { y = y - 100.0; } GetZombieVictimID[npcid] = INVALID_PLAYER_ID; RNPC_SetKeys(0); MoveRNPC(npcid, x, y, z, RNPC_SPEED_WALK, 1); } } } } return 1; }
Can you help me how ?