[AJUDA] Skins das Orgs
#1

Olб pessoal, bom dia a todos...


Eu queria saber, como posso fazer para criar variaveis, ou array para a skin de cada organizaзгo..
Ex:

Var's que seriam globais,, acho que й isso
PHP код:
PM 185;
PC 154
Ai no comando/funзгo
PHP код:
SetPlayerSkin(playeridPM); //Seta a skin 185 
Agradeзo quem puder dar uma ajuda pequena
Reply
#2

pawn Код:
#define skin_pm 185

setplayerskin(playerid, skin_pm);
Reply
#3

Quote:
Originally Posted by Ghost_
Посмотреть сообщение
pawn Код:
#define skin_pm 185

setplayerskin(playerid, skin_pm);
e Como eu poderia fazer para cada cargo e sexo ?
Tipo:

Ex:

PHP код:
if(PlayerInfo[playerid][pSex] == 1//Sexo masculino
{
    
Cargo 1 134
    Cargo 2 
468
}
else 
//Sexo Feminino
{
    
Cargo 1 45;
    
Cargo 2 48;

Reply
#4

pawn Код:
#Define PMCargo1   IdSkin
SetPlayerSkin(playerid, PMCargo1);
Reply
#5

Assim й o correto, definindo qual й homem ou mulher.
pawn Код:
#define pSex 1 // homem
#define pSex 0 // muie

if(PlayerInfo[playerid][pSex] == 1) //Sexo masculino
{
    Cargo 1 = 134
    Cargo 2 = 468
}
if(PlayerInfo[playerid][pSex] == 0) //muie
{
    Cargo 1 = 45
    Cargo 2 = 48
}
Reply
#6

USE stock:
pawn Код:
stock SetSkin(playerid)
{
    if(PlayerInfo[playerid][pMembro] == 1)
    {
        if(PlayerInfo[playerid][pSex] == 1) //Sexo masculino
        {
            if(PlayerInfo[playerid][pCargo] == 1) SetPlayerSkin(playerid, 134);
            if(PlayerInfo[playerid][pCargo] == 2) SetPlayerSkin(playerid, 468);
        }
        else //Sexo Feminino
        {
            if(PlayerInfo[playerid][pCargo] == 1) SetPlayerSkin(playerid, 45);
            if(PlayerInfo[playerid][pCargo] == 2) SetPlayerSkin(playerid, 48);
        }
    else if(PlayerInfo[playerid][pMembro] == 2)
    {
        if(PlayerInfo[playerid][pSex] == 1) //Sexo masculino
        {
            if(PlayerInfo[playerid][pCargo] == 1) SetPlayerSkin(playerid, 134);
            if(PlayerInfo[playerid][pCargo] == 2) SetPlayerSkin(playerid, 468);
        }
        else //Sexo Feminino
        {
            if(PlayerInfo[playerid][pCargo] == 1) SetPlayerSkin(playerid, 45);
            if(PlayerInfo[playerid][pCargo] == 2) SetPlayerSkin(playerid, 48);
        }
    }
    return 1;
}

//USO:
SetSkin(playerid);
Reply
#7

Quote:
Originally Posted by CidadeNovaRP
Посмотреть сообщение
USE stock:
pawn Код:
stock SetSkin(playerid)
{
    if(PlayerInfo[playerid][pMembro] == 1)
    {
        if(PlayerInfo[playerid][pSex] == 1) //Sexo masculino
        {
            if(PlayerInfo[playerid][pCargo] == 1) SetPlayerSkin(playerid, 134);
            if(PlayerInfo[playerid][pCargo] == 2) SetPlayerSkin(playerid, 468);
        }
        else //Sexo Feminino
        {
            if(PlayerInfo[playerid][pCargo] == 1) SetPlayerSkin(playerid, 45);
            if(PlayerInfo[playerid][pCargo] == 2) SetPlayerSkin(playerid, 48);
        }
    else if(PlayerInfo[playerid][pMembro] == 2)
    {
        if(PlayerInfo[playerid][pSex] == 1) //Sexo masculino
        {
            if(PlayerInfo[playerid][pCargo] == 1) SetPlayerSkin(playerid, 134);
            if(PlayerInfo[playerid][pCargo] == 2) SetPlayerSkin(playerid, 468);
        }
        else //Sexo Feminino
        {
            if(PlayerInfo[playerid][pCargo] == 1) SetPlayerSkin(playerid, 45);
            if(PlayerInfo[playerid][pCargo] == 2) SetPlayerSkin(playerid, 48);
        }
    }
    return 1;
}

//USO:
SetSkin(playerid);
Vlw, era isso que eu precisava e aos outros, ganham meu REP por tentarem ajudar vou usar stock
Reply
#8

Quote:
Originally Posted by EditPawn
Посмотреть сообщение
Vlw, era isso que eu precisava e aos outros, ganham meu REP por tentarem ajudar vou usar stock
Disponha .
Para mais informaзхes de como usar stock:
https://sampwiki.blast.hk/wiki/Stocks
Reply
#9

Quote:
Originally Posted by CidadeNovaRP
Посмотреть сообщение
Disponha .
Para mais informaзхes de como usar stock:
https://sampwiki.blast.hk/wiki/Stocks
Vlw, eu ja sei mecher com stock's mas nгo sabia como fazer para setar as skins para cada org... nem tinha pensado em stock. rsrs

Vlw msm
Reply
#10

pawn Код:
//TOPO

#define SKIN_ORG_CARGO_1

//Local que desejar
SetPlayerSkin(playerid,SKIN_ORG_CARGO_1);
SendClientMessage(playerid,0x00FFFF, "Sua Skin foi setada de acordo com seu cargo");
FEito /\
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)