SA-MP Forums Archive
[Ajuda]Denovo, ajuda rapida - 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]Denovo, ajuda rapida (/showthread.php?tid=337582)



[Ajuda]Denovo, ajuda rapida - Felipe_Wesker - 26.04.2012

Queria saber 2 coisas,
1є - й como por aqueles textdrwas, conforme vc muda de skins. Por exemplo, vc vai mudando as skins e dai mostra "Gang dos groves".. "Gang dos Balas".. e assim vai.

2є - Estou usando cameras para selecionar a skin do player, no RequestClass, e estou usando um interior tmb. Mas quando dou spawn, eu saio em uma coordenada no interior 0, e fica tudo cinza, pq o GM nгo seta os interiores automaticamente. Queria saber se tem como por algum code em algum lugar, para setar o interior do player qndo ele der spawn. VLW


Re: [Ajuda]Denovo, ajuda rapida - ViniBorn - 26.04.2012

TextDrawSetString a cada vez que mudar a skin.

Coloca SetPlayerInterior(playerid, 0); assim que ele escolher a skin.


Re: [Ajuda]Denovo, ajuda rapida - Felipe_Wesker - 26.04.2012

Mas vini, por SetPlayerInterior, aonde? no OnPlayerRequestClass?

pode me dar um exemplo de TextDrawSetString?


Re: [Ajuda]Denovo, ajuda rapida - Joker_OutLock - 26.04.2012

pawn Код:
GameTextForPlayer(playerid, "Groove", 500, 3);
e a sim por diante..


Re: [Ajuda]Denovo, ajuda rapida - ViniBorn - 26.04.2012

Pode ser no OnPlayerSpawn(se nгo for spawn em interiores)

pawn Код:
new Text:Teste;

// OnGameModeInit
Teste = TextDrawCreate(100.0, 100.0, "Testando");

//Mudanзa de skin
TextDrawSetString(Teste , "Gang tal");  
TextDrawShowForPlayer(playerid, Teste);



Re: [Ajuda]Denovo, ajuda rapida - Felipe_Wesker - 26.04.2012

hm ok. vlw ae aos 2

edit: da erro, dizendo q ele n conheзe o playerid.


Re: [Ajuda]Denovo, ajuda rapida - ViniBorn - 27.04.2012

Colocou em qual public ?


Re: [Ajuda]Denovo, ajuda rapida - Caio_Freeze - 27.04.2012

acho q ele coloco na public OnGameModeInit()

Talvez se ele colova na public OnPlayerConnect(playerid) funcione.


Re: [Ajuda]Denovo, ajuda rapida - Felipe_Wesker - 27.04.2012

public OnGameModeInit() - coloquei ai, vou por na on connect e ver

Edit: se ponho na PlayerConnect, compila mas nada acontece. Estou usando o codigo assim:

pawn Код:
public OnGameModeInit()
{
    SetGameModeText("CopS and RobberS");
    //Cops
    AddPlayerClass(280, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(281, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(282, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(283, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(284, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(288, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    //Civis
    AddPlayerClass(2, 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);
    AddPlayerClass(6, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(7, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(15, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(23, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
    //Cops
    AddPlayerClass(280, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "LSPD", 500, 3);
    AddPlayerClass(281, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "LSPD", 500, 3);
    AddPlayerClass(282, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "LSPD", 500, 3);
    AddPlayerClass(283, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "LSPD", 500, 3);
    AddPlayerClass(284, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "LSPD", 500, 3);
    AddPlayerClass(288, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "LSPD", 500, 3);
    //Civis
    GameTextForPlayer(playerid, "Civil", 500, 3);
    AddPlayerClass(2, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "Civil", 500, 3);
    AddPlayerClass(4, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "Civil", 500, 3);
    AddPlayerClass(6, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "Civil", 500, 3);
    AddPlayerClass(7, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "Civil", 500, 3);
    AddPlayerClass(15, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "Civil", 500, 3);
    AddPlayerClass(23, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    GameTextForPlayer(playerid, "Civil", 500, 3);
    return 1;
}



Re: [Ajuda]Denovo, ajuda rapida - ViniBorn - 27.04.2012

Deixa AddPlayerClass sу em OnGameModeInit.


OnGameModeInit, coloca no OnPlayerRequestClass