17.01.2016, 15:22
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;
}
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;
}