SA-MP Forums Archive
Help How to change bot skin - 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: Help How to change bot skin (/showthread.php?tid=385036)



Help How to change bot skin - IIKINGII - 14.10.2012

Hi Guys i want to change the skin of my bot how what i need to put i want this skin ID 251
_______________
#include <a_npc>


readaction()
{
StartRecordingPlayback(2,"bot");
}

public OnNPCSpawn()
{
readaction();

return 1;
}

public OnRecordingPlaybackEnd()
{
readaction();

}


Re: Help How to change bot skin - tsonn1 - 14.10.2012

Do something like this under onplayerrequestclass:
pawn Code:
if(IsPlayerNPC(playerid))
    {
        new playername[MAX_PLAYER_NAME];
        GetRPName(playerid, playername, MAX_PLAYER_NAME);
        if(!strcmp(playername,"YourBotNameHere",true))
        {
            SafeSetPlayerSkin(playerid, YourBotSkinIDHere);
            printf("An NPC spawned, Name: %s, ID: %d!",playername, playerid);
        }
    }



Re: Help How to change bot skin - IIKINGII - 14.10.2012

Dont works maybe i put it at the wrong place can you put it for me i got this
______________________________________
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid)) return 1;

if(gPlayerHasCitySelected[playerid]) {
ClassSel_SetupCharSelection(playerid);
return 1;
} else {
if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
TogglePlayerSpectating(playerid,1);
TextDrawShowForPlayer(playerid, txtClassSelHelper);
gPlayerCitySelection[playerid] = -1;
}
}

return 0;
}


Re: Help How to change bot skin - JaKe Elite - 14.10.2012

put it OnPlayerSpawn


Re: Help How to change bot skin - IIKINGII - 14.10.2012

Dont works same error
__________________________________________________ _____________________
G:\SA-MP\gamemodes\grandlarc.pwn(87) : error 017: undefined symbol "GetRPName"
G:\SA-MP\gamemodes\grandlarc.pwn(90) : error 017: undefined symbol "SafeSetPlayerSkin"


Re: Help How to change bot skin - jotan. - 14.10.2012

Add this onPlayerSpawn
pawn Code:
{
if(IsPlayerNPC(playerid))
{
if(gPlayerHasCitySelected[playerid]) {
ClassSel_SetupCharSelection(playerid);
return 1;
} else {
if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
TogglePlayerSpectating(playerid,1);
TextDrawShowForPlayer(playerid, txtClassSelHelper);
gPlayerCitySelection[playerid] = -1;
}
}

return 0;
}



Re: Help How to change bot skin - JaKe Elite - 14.10.2012

Error? What error??


Re: Help How to change bot skin - IIKINGII - 14.10.2012

Still Nothing Error:

error 017: undefined symbol "GetRPName"
error 017: undefined symbol "SafeSetPlayerSkin"


Re: Help How to change bot skin - TzAkS. - 14.10.2012

@Tsonn,copy-paste from your gm,he don`t have that functions.
Just do like this to OnPlayerSpawn
Code:
if(IsPlayerNPC(playerid))
{
    if(!strcmp(npcname, "NPCNAME", true))
    {
        SetPlayerSkin(playerid, 251);
        return 1;
	}
}
Change NPCNAME with your npc name..


Re: Help How to change bot skin - IIKINGII - 14.10.2012



Error: error 017: undefined symbol "npcname"