SA-MP Forums Archive
Npc problem! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Npc problem! (/showthread.php?tid=184384)



Npc problem! - iJumbo - 19.10.2010

Hi all
i have a problem with my npc's i try to make a npc.. the registration,the script,the connect in my gm,all ok no errors
but when npc connect on my server he get spawned in center of san andreas :/ and i can see him

any one know why?
thx
sorry for my bad english


Re: Npc problem! - JaTochNietDan - 19.10.2010

You must tell the script what to do with the NPC.

For example:

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        PutPlayerInVehicle(playerid,vehicleid,0); // Put him in a vehicle of your choice?
        SetPlayerPos(playerid,0.0,0.0,0.0); // Put him somewhere of your choice?
        SetPlayerSkin(playerid,29); // Put him in the hoodie skin?
        // And so on, you can also have multiple NPC's and use name-checking to identify them
    }
    return 1;
}



Re: Npc problem! - iJumbo - 19.10.2010

ok im trying thx for help