NPC help
#2

Just easy tricks:

PHP код:
//Under OnPlayerConnect always@TOP!
if(IsPlayerNPC(playerid)) return 1;
//Under OnPlayerRequestClass
if(IsPlayerNPC(playerid))
{
    
SetSpawnInfo(playerid,0,299,0,0,3,0,0,0,0,0,0,0);
    
SpawnPlayer(playerid);
    return 
1;
}
//Under OnPlayerSpawn
if(IsPlayerNPC(playerid))
{
    new 
n[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,n,MAX_PLAYER_NAME);
    if(!
strcmp(n,"Peter"))
    {
        
//For example if Peter spawns:
        
SetPlayerSkin(playerid69); //Like this number :3
    
}
    return 
1;

If you do this statements always at the top of these callbacks..nothing can happen with them and they will spawn directly
If you wanna have Zombie NPCs you have to use a Plugin..like FCNPC
Just look at some tutorials how you create them
Reply


Messages In This Thread
NPC help - by Josh_Main - 19.09.2016, 15:31
Re: NPC help - by Kaliber - 19.09.2016, 15:43
Re: NPC help - by jlalt - 19.09.2016, 15:44
Re: NPC help - by Josh_Main - 19.09.2016, 15:49
Re: NPC help - by Kaliber - 19.09.2016, 16:08
Re: NPC help - by Josh_Main - 19.09.2016, 16:21
Re: NPC help - by Kaliber - 19.09.2016, 16:33
Re: NPC help - by Josh_Main - 19.09.2016, 16:37
Re: NPC help - by Kaliber - 19.09.2016, 16:38
Re: NPC help - by Josh_Main - 19.09.2016, 16:44

Forum Jump:


Users browsing this thread: 3 Guest(s)