Help How to change bot skin
#1

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();

}
Reply
#2

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);
        }
    }
Reply
#3

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;
}
Reply
#4

put it OnPlayerSpawn
Reply
#5

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"
Reply
#6

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;
}
Reply
#7

Error? What error??
Reply
#8

Still Nothing Error:

error 017: undefined symbol "GetRPName"
error 017: undefined symbol "SafeSetPlayerSkin"
Reply
#9

@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..
Reply
#10



Error: error 017: undefined symbol "npcname"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)