06.10.2017, 09:25
(
Последний раз редактировалось StrikerZ; 06.10.2017 в 10:22.
)
Well, I'm trying to use RNPC, I'm using bare gamemode so no login dialog is there.
The problem is, it connects but doesn't spawns. Yes I'm using the PathFinder plugin too.
I tried with a simple script without PathFinder, that doesn't work too.
This code is on OnFilterScriptInit
To debug
Log
I even went in game to check but there's no NPC
The problem is, it connects but doesn't spawns. Yes I'm using the PathFinder plugin too.
I tried with a simple script without PathFinder, that doesn't work too.
This code is on OnFilterScriptInit
PHP код:
for(new i =0; i < MAX_ZOMBIES;i++)
{
new spawn = random(sizeof(ZombieSpawns));
new name[24], then_npc;
format(name, sizeof(name), ZOMBIE_NAME, zombie_count + 1);
then_npc = ConnectRNPC(name);
SpawnPlayer(then_npc);
SetPlayerPos(then_npc,ZombieSpawns[spawn][0], ZombieSpawns[spawn][1], ZombieSpawns[spawn][2]);
SetPlayerSkin(then_npc, random(298)+1);
SetRNPCHealth(then_npc, ZOMBIE_HEALTH);
SetPlayerColor(then_npc, ZOMBIE_COLOR);
ZombieIsAttack[then_npc] = 0;
ApplyAnimation(then_npc, "PED", "WALK_fatold", 3.1, 1, 1, 1, 0, 0);
zombie_count++;
RNPC_SetShootable(then_npc, 1);
}
PHP код:
public OnPlayerSpawn(playerid)
{
new spawn = random(sizeof(ZombieSpawns));
if(IsPlayerNPC(playerid))
{
printf("Yes");
PHP код:
[03:21:32] [connection] 127.0.0.1:58285 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58286 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58287 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58288 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58289 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58290 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58292 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58291 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58293 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58294 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58295 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58296 requests connection cookie.
[03:21:32] [connection] 127.0.0.1:58297 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58298 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58299 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58300 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58301 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58302 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58303 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58304 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58305 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58306 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58307 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58308 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58309 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58310 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58311 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58312 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58313 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58314 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58315 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58317 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58316 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58318 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58319 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58320 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58321 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58322 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58323 requests connection cookie.
[03:21:33] [connection] 127.0.0.1:58324 requests connection cookie.
[03:21:34] [connection] 127.0.0.1:58325 requests connection cookie.
[03:21:34] Loaded 1 filterscripts.
[03:21:34] [connection] 127.0.0.1:58326 requests connection cookie.
[03:21:34] [connection] 127.0.0.1:58327 requests connection cookie.
[03:21:34] [connection] 127.0.0.1:58328 requests connection cookie.
[03:21:34] [connection] 127.0.0.1:58329 requests connection cookie.
[03:21:34] [connection] 127.0.0.1:58330 requests connection cookie.
[03:21:34] [connection] 127.0.0.1:58331 requests connection cookie.
[03:21:34] RNPC versionchecker: checking for updates...
[03:21:34]
/*-----------------------------------*\
[03:21:34] |*=====[TS Base GameMode Loaded]=====*|
[03:21:34] \*-----------------------------------*/
[03:21:34] Number of vehicle models: 0
[03:21:34] [connection] incoming connection: 127.0.0.1:58285 id: 0
[03:21:34] [connection] incoming connection: 127.0.0.1:58286 id: 1
[03:21:34] [connection] incoming connection: 127.0.0.1:58288 id: 2
[03:21:34] [connection] incoming connection: 127.0.0.1:58287 id: 3
[03:21:34] [connection] incoming connection: 127.0.0.1:58289 id: 4
[03:21:34] [connection] incoming connection: 127.0.0.1:58292 id: 5
[03:21:34] [connection] incoming connection: 127.0.0.1:58290 id: 6
[03:21:34] [connection] incoming connection: 127.0.0.1:58291 id: 7
[03:21:34] [connection] incoming connection: 127.0.0.1:58293 id: 8
[03:21:34] [connection] incoming connection: 127.0.0.1:58294 id: 9
[03:21:34] [connection] incoming connection: 127.0.0.1:58295 id: 10
[03:21:34] [connection] incoming connection: 127.0.0.1:58296 id: 11
[03:21:34] [connection] incoming connection: 127.0.0.1:58297 id: 0
[03:21:34] [connection] incoming connection: 127.0.0.1:58298 id: 1
[03:21:34] [connection] incoming connection: 127.0.0.1:58299 id: 2
[03:21:34] [connection] incoming connection: 127.0.0.1:58300 id: 3
[03:21:34] [connection] incoming connection: 127.0.0.1:58301 id: 4
[03:21:34] [connection] 127.0.0.1:58332 requests connection cookie.
[03:21:34] [connection] incoming connection: 127.0.0.1:58302 id: 5
[03:21:34] [connection] 127.0.0.1:58333 requests connection cookie.
[03:21:34] [connection] incoming connection: 127.0.0.1:58303 id: 6
[03:21:34] [connection] 127.0.0.1:58334 requests connection cookie.
[03:21:34] [connection] incoming connection: 127.0.0.1:58304 id: 0
[03:21:34] [connection] incoming connection: 127.0.0.1:58305 id: 7
[03:21:34] [connection] incoming connection: 127.0.0.1:58306 id: 1
[03:21:34] [connection] incoming connection: 127.0.0.1:58307 id: 2
[03:21:34] [connection] incoming connection: 127.0.0.1:58308 id: 3
[03:21:34] [connection] incoming connection: 127.0.0.1:58309 id: 0
[03:21:34] [connection] incoming connection: 127.0.0.1:58310 id: 4
[03:21:34] [connection] incoming connection: 127.0.0.1:58311 id: 1
[03:21:34] [connection] incoming connection: 127.0.0.1:58312 id: 2
[03:21:34] [connection] incoming connection: 127.0.0.1:58313 id: 5
[03:21:34] [connection] incoming connection: 127.0.0.1:58314 id: 6
[03:21:34] [connection] incoming connection: 127.0.0.1:58315 id: 3
[03:21:34] [connection] incoming connection: 127.0.0.1:58317 id: 0
[03:21:34] [connection] incoming connection: 127.0.0.1:58316 id: 4
[03:21:34] [connection] incoming connection: 127.0.0.1:58318 id: 7
[03:21:34] [connection] incoming connection: 127.0.0.1:58319 id: 1
[03:21:34] [connection] incoming connection: 127.0.0.1:58320 id: 2
[03:21:34] [connection] incoming connection: 127.0.0.1:58321 id: 5
[03:21:34] [connection] incoming connection: 127.0.0.1:58322 id: 3
[03:21:34] [connection] incoming connection: 127.0.0.1:58323 id: 6
[03:21:34] [connection] incoming connection: 127.0.0.1:58324 id: 0
[03:21:35] [connection] incoming connection: 127.0.0.1:58325 id: 1
[03:21:35] [connection] incoming connection: 127.0.0.1:58326 id: 2
[03:21:35] [connection] incoming connection: 127.0.0.1:58327 id: 4
[03:21:35] [connection] incoming connection: 127.0.0.1:58330 id: 5
[03:21:35] [connection] incoming connection: 127.0.0.1:58328 id: 7
[03:21:35] [connection] incoming connection: 127.0.0.1:58329 id: 8
[03:21:35] [connection] incoming connection: 127.0.0.1:58331 id: 3
[03:21:35] [connection] incoming connection: 127.0.0.1:58332 id: 0
[03:21:35] [connection] incoming connection: 127.0.0.1:58333 id: 6
[03:21:35] [connection] incoming connection: 127.0.0.1:58334 id: 9