[Duda] Selecciуn de mas de un skin
#1

Hola, estuve trabajando en hacer un TDM y no sй como hacer para que un equipo pueda tener mas de 1 skin, y que todos los usuarios que sean del equipo tengan el mismo Skin.
Les paso las lineas.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    gPlayerClass[playerid] = classid;

    switch (classid)
    {
        case 0:
        {
            gTeam[playerid] = TEAM_RUSO;
            GameTextForPlayer(playerid, "{FF7681}Rusia", 1000, 6);
        }
        case 1:
        {
            gTeam[playerid] = TEAM_USA;
            GameTextForPlayer(playerid, "{00BE4D}Estados Unidos", 1000, 6);
        }
        case 2:
        {
            gTeam[playerid] = TEAM_ALEMAN;
            GameTextForPlayer(playerid, "{007681}Alemania", 1000, 6);
        }
        case 3:
        {
            gTeam[playerid] = TEAM_CHINO;
            GameTextForPlayer(playerid, "{FF0267}China", 1000, 6);
        }
    }
   


    SetPlayerPos(playerid, 489.8416,-72.4437,999.2266);
    SetPlayerFacingAngle( playerid, 2.3616 );
    SetPlayerCameraPos(playerid, 491.6849,-72.3607,999.2117);
    SetPlayerCameraLookAt(playerid, 489.8416,-72.4437,999.2266);
    SetPlayerInterior(playerid ,11);
    return 1;
}
pawn Код:
AddPlayerClass(112, -237.0269,2627.2815,62.7102, 24, 100, 25, 100, 30, 300); //RUSO
AddPlayerClass(285, 214.0081,1864.2412,13.1406, 24, 100, 25, 100, 31, 300); //USA
AddPlayerClass(179, -856.1163,1504.1165,20.8464, 24, 100, 25, 100, 31, 300); //ALEMAN
AddPlayerClass(186, 1096.8202,1907.4955,10.8203, 24, 100, 25, 100, 30, 300); //ASIATICO
La idea es que los usuarios tengan para elegir mбs de un skin por equipo.
Reply
#2

mira este cуdigo (http://forum.sa-mp.com/showthread.ph...22#post3122722)
Reply
#3

Pero en
pawn Код:
AddPlayerClass(1, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(2, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(3, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(4, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
En el lugar de 1,2,3,4 le pongo el ID de los skins, y aca tambiйn?.
pawn Код:
if(classid == 179 || classid == 186)
        {
            GameTextForPlayer(playerid, "ASdasdas",1000,5);
        }
        else if(classid == 112 || classid == 285)
        {
            GameTextForPlayer(playerid, "ASdasdas",1000,5);
        }
Reply
#4

Sн, pero en classid va el id que se tiene de AddPlayerClass segъn el orden en que se cargу desde 0
Reply
#5

AddPlayerClass(112, -237.0269,2627.2815,62.7102, 24, 100, 25, 100, 30, 300); //LUGAR 0
AddPlayerClass(285, 214.0081,1864.2412,13.1406, 24, 100, 25, 100, 31, 300); //LUGAR 1
AddPlayerClass(179, -856.1163,1504.1165,20.8464, 24, 100, 25, 100, 31, 300); //Lugar 2
AddPlayerClass(186, 1096.8202,1907.4955,10.8203, 24, 100, 25, 100, 30, 300); //LUGAR 3

Y esto queda asн?

pawn Код:
if(classid == 0 || classid == 1)
        {
            GameTextForPlayer(playerid,"~g~GROVE STREET",1000,5);
            SetPVarInt(playerid, "PandillaElegida", 1);
        }
        else if(classid == 2 || classid == 3)
        {
            GameTextForPlayer(playerid,"~P~BALLAS",1000,5);
            SetPVarInt(playerid, "PandillaElegida", 2);
        }
        return 1;
    }
Reply
#6

sн!, exacto
Reply
#7

Gracias :3
Pero.

їTe puedo hacer una pregunta mбs?

Mira, el siguiente codigo, їestб bien?

pawn Код:
if(classid == 0)
        {
            gTeam[playerid] = TEAM_RUSO;
            GameTextForPlayer(playerid, "{FF7681}Rusia",1000,5);
        }
        else if(classid == 1)
        {
            gTeam[playerid] = TEAM_USA;
            GameTextForPlayer(playerid, "{00BE4D}Estados Unidos",1000,5);
        }
        else if(classid == 2)
        {
            gTeam[playerid] = TEAM_ALEMAN;
            GameTextForPlayer(playerid, "{007681}Alemania", 1000, 6);
    }
    else if(classid == 3)
    {
            gTeam[playerid] = TEAM_CHINO;
            GameTextForPlayer(playerid, "{FF0267}China", 1000, 6);
    }
?? :/
Reply
#8

Claro, lo hice con || para aсadir mбs skin a un equipo.
Reply
#9

їPorque me salen estos 4 warnings?

Quote:

C:\Users\Servidor\Desktop\Escritorio\samp03e_svr_R 2_win32\gamemodes\lvtdm.pwn(76) : warning 202: number of arguments does not match definition
C:\Users\Servidor\Desktop\Escritorio\samp03e_svr_R 2_win32\gamemodes\lvtdm.pwn(77) : warning 202: number of arguments does not match definition
C:\Users\Servidor\Desktop\Escritorio\samp03e_svr_R 2_win32\gamemodes\lvtdm.pwn(7 : warning 202: number of arguments does not match definition
C:\Users\Servidor\Desktop\Escritorio\samp03e_svr_R 2_win32\gamemodes\lvtdm.pwn(79) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Warnings.

Lineas:
Quote:

AddPlayerClass(112, -237.0269,2627.2815,62.7102, 24, 100, 25, 100, 30, 300); //RUSO
AddPlayerClass(285, 214.0081,1864.2412,13.1406, 24, 100, 25, 100, 31, 300); //USA
AddPlayerClass(179, -856.1163,1504.1165,20.8464, 24, 100, 25, 100, 31, 300); //ALEMAN
AddPlayerClass(186, 1096.8202,1907.4955,10.8203, 24, 100, 25, 100, 30, 300); //ASIATICO

Reply
#10

Porque estбs agregando mбs argumentos de los definidos en el native.

Echale un vistazo a esto
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)