SA-MP Forums Archive
[AJUDA] Spawn do player... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Spawn do player... (/showthread.php?tid=253807)



[AJUDA] Spawn do player... - tivin - 08.05.2011

galera, quando iniciava meu server, aparecia pra escolher: zumbi e humano, aн meu amigo pois uma text draw identificando esses 2 pra min sу q agora se eu escolher zumbi ou humano tanto faz vem sempre humano .-. porque ? valeu

olha o code antigo do public OnPlayerRequestClass(playerid,classid)

pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
    SetPlayerPos(playerid,299.9177,2741.7598,42.9127);
    SetPlayerFacingAngle(playerid,198.9686);
    SetPlayerCameraPos(playerid,306.3498,2727.6697,37.0493);
    SetPlayerCameraLookAt(playerid,299.9177,2741.7598,42.9127);
    if(classid == 0)
    {
        PlayerTeam[playerid] = 0;
        SetPlayerTeam(playerid,0);
    }
    else if(classid == 1)
    {
        PlayerTeam[playerid] = 1;
        SetPlayerTeam(playerid,1);
    }
    return 1;
}
o novo codigo:

pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,2965.3875,-1879.3577,8.7813);
    SetPlayerFacingAngle(playerid,94.2419);
    SetPlayerCameraPos(playerid,2962.0913,-1879.5524,8.7813);
    SetPlayerCameraLookAt(playerid,2965.3875,-1879.3577,8.7813);
    gPlayerClass[playerid] = classid;
    switch (classid)
    {
        case 0:
        {
            SetPlayerColor(playerid, COLOR_GREEN);
            GameTextForPlayer(playerid, "~g~Humanos", 10000, 4);
        }
        case 1:
        {
            SetPlayerColor(playerid, COLOR_RED);
            GameTextForPlayer(playerid, "~r~Zumbis", 10000, 4);
        }
    }
    return 1;
}
plz ajudem ae


Re: [AJUDA] Spawn do player... - JonathanFeitosa - 08.05.2011

pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,2965.3875,-1879.3577,8.7813);
    SetPlayerFacingAngle(playerid,94.2419);
    SetPlayerCameraPos(playerid,2962.0913,-1879.5524,8.7813);
    SetPlayerCameraLookAt(playerid,2965.3875,-1879.3577,8.7813);
    gPlayerClass[playerid] = classid;
    switch (classid)
    {
        case 0:
        {
            PlayerTeam[playerid] = 0;
            SetPlayerTeam(playerid,0);
            SetPlayerColor(playerid, COLOR_GREEN);
            GameTextForPlayer(playerid, "~g~Humanos", 4000, 4);
        }
        case 1:
        {
            PlayerTeam[playerid] = 1;
            SetPlayerTeam(playerid,1);          
            SetPlayerColor(playerid, COLOR_RED);
            GameTextForPlayer(playerid, "~r~Zumbis", 4000, 4);
        }
    }
    return 1;
}
Arrumei atй os segundos do GameTextForPlayer. 10 seg. pode bugar.


Respuesta: [AJUDA] Spawn do player... - tivin - 08.05.2011

pronto por enquanto ta resolvido, valeus ae