Changing NPC skin
#3

pawn Код:
public OnPlayerSpawn(playerid)
 {
        if(IsPlayerNPC(playerid))
        {
            new npc_name[24];
            GetPlayerName(playerid,npc_name,sizeof(npc_name));
            if(!strcmp(npc_name,"Cocaine1",false))
            {
            SetPlayerSkin(playerid, 144); // your skin choice for NPC
            }
            return 1;
        }



        if(IsPlayerNPC(playerid))
        {
            new npc_name[24];
            GetPlayerName(playerid,npc_name,sizeof(npc_name));
            if(!strcmp(npc_name,"Cocaine2",false))
            {
            SetPlayerSkin(playerid, 144); // your skin choice for NPC
            }
            return 1;
        }
       
        if(IsPlayerNPC(playerid))
        {
            new npc_name[24];
            GetPlayerName(playerid,npc_name,sizeof(npc_name));
            if(!strcmp(npc_name,"Cocaine3",false))
            {
            SetPlayerSkin(playerid, 144); // your skin choice for NPC
            }
            return 1;
        }

    return 1;
}
This is what I got now, but only the first one ''Cocaine1'' Changed skin the others didn't.
Reply


Messages In This Thread
Changing NPC skin - by jurtes - 22.09.2010, 14:30
Re: Changing NPC skin - by Rachael - 22.09.2010, 14:34
Re: Changing NPC skin - by jurtes - 22.09.2010, 14:49
Re: Changing NPC skin - by Rachael - 22.09.2010, 14:51
Re: Changing NPC skin - by jurtes - 22.09.2010, 15:05
Re: Changing NPC skin - by Mauzen - 22.09.2010, 15:24

Forum Jump:


Users browsing this thread: 1 Guest(s)