SA-MP Forums Archive
NPC Help?? - 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)
+--- Thread: NPC Help?? (/showthread.php?tid=598851)



NPC Help?? - RyanEng16 - 17.01.2016

Hello, If I have this code that add's NPC into my game and its all working. What do I need to add/change ion the code so im able to change the skin of the NPC's??

This is the filterscript code im using...

#include <a_samp>
#include <a_npc>


new Bravura;
new Club;
new Merit;

public OnGameModeInit()
{
ConnectNPC("Brandon_Jenkins","brandonjenkins");
ConnectNPC("Ste_Nagy","stenagy");
ConnectNPC("Amilio_Rimeez","amiliorimeez");


Bravura = AddStaticVehicle(401, 2109.1763, 1503.0453, 32.2887, 82.2873, 3, 3);
Club = AddStaticVehicle(589, 2109.1763, 1503.0453, 32.2887, 82.2873, 151, 151);
Merit = AddStaticVehicle(551, 2109.1763, 1503.0453, 32.2887, 82.2873, 7, 7);

}

public OnPlayerSpawn(playerid)
{
if(!IsPlayerNPC(playerid)) return 0;

new playername[64];
GetPlayerName(playerid,playername,64);

if(!strcmp(playername,"Brandon_Jenkins",true)) {
PutPlayerInVehicle(playerid, Bravura, 0);
}
else if(!strcmp(playername,"Ste_Nagy",true)) {
PutPlayerInVehicle(playerid, Club, 0);
}
else if(!strcmp(playername,"Amilio_Rimeez",true)) {
PutPlayerInVehicle(playerid, Merit, 0);
}

return 1;
}


Re: NPC Help?? - DRP - 17.01.2016

https://sampforum.blast.hk/showthread.php?tid=95034 - this helped me a lot about NPC.


Re: NPC Help?? - RyanEng16 - 17.01.2016

Yes i have read this but it doesnt tell mw how to change the skin of somebody in a car...