[Ajuda] Ajuda Aki
#1

Oi Gente, Eu to Aki Pra Pedir Alguma Text Draw Para Sуcios Tipo Meu Game Mode Tem 4 Tipos de Sуcios: Bronze,Prata,Ouro e Diamante Ai Eu Queria Saber Como Eu Faзo Pra Colocar Quando o Sуcio Diamante Logar No Server e Aparecer a Text Draw Bem no Meio da Tela Dizendo
Socio Diamante:
Captain_Price On

Acho que Isso Ajuda a Vcs Pra Criar a Text Draw!
Quote:

if(PlayerInfo[playerid][pSocio] >= 4)

Reply
#2

Passa As Variбveis Dos 4 Tipos De Socios!
Reply
#3

Mais Como Assim? Eu so Quero Colocar a Mensagem Pro Sуcio Diamante!
Reply
#4

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][pSocio] == 4) //Verifica se й socio diamante
    {
        new Frase[50], Nome[25]; //Cria as variaveis para armazenar a string e o nome
        GetPlayerName(playerid, Nome, 25); //Pega o nome do player, armazenando na variavel Nome
        format(Frase, sizeof(Frase), "socio diamante:~n~%s online", Nome); //Formata a string com o Nome
        GameTextForAll(Frase, 3000, 3); //Manda a mensagem para todos
    }
    return 1;
}
.
Reply
#5

Quote:
Originally Posted by HardWar
Посмотреть сообщение
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][pSocio] == 4) //Verifica se й socio diamante
    {
        new Frase[50], Nome[25]; //Cria as variaveis para armazenar a string e o nome
        GetPlayerName(playerid, Nome, 25); //Pega o nome do player, armazenando na variavel Nome
        format(Frase, sizeof(Frase), "socio diamante:~n~%s online", Nome); //Formata a string com o Nome
        GameTextForAll(Frase, 3000, 3); //Manda a mensagem para todos
    }
    return 1;
}
.
Ou em OnPlayerConnect.
Se for usar TextDraw mude a funзгo


Pawn Code Base:
pawn Код:
new Text:txd; //topo do gamemode

public OnGameModeInit( )
{
    txd= TextDrawCreate(150,120, "_"); //Verifique as cordenadas
    return true;
}

public OnPlayerConnect( playerid )
{
    new XX[ 60 ], name[ MAX_PLAYER_NAME + 1 ];
    if(PlayerInfo[playerid][pSocio] >= 4)
    {
    GetPlayerName( playerid, name, MAX_PLAYER_NAME +1 );
    format( XX, sizeof( XX ), "%s, Socio conectado", name );
    TextDrawSetString( txd, XX );  
    TextDrawShowForAll( txd );
    return true;
}
Reply
#6

HardWar Funcionou Direitinho Agora Como Eu Faзo Pra Colocar a Mensagem Quando o Socio Diamante Sai Do Server Tipo
Socio Diamante:
Captain_Price OFF
Reply
#7

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(PlayerInfo[playerid][pSocio] == 4) //Verifica se й socio diamante
    {
        new Frase[50], Nome[25]; //Cria as variaveis para armazenar a string e o nome
        GetPlayerName(playerid, Nome, 25); //Pega o nome do player, armazenando na variavel Nome
        format(Frase, sizeof(Frase), "socio diamante:~n~%s offline", Nome); //Formata a string com o Nome
        GameTextForAll(Frase, 3000, 3); //Manda a mensagem para todos
    }
    return 1;
}
Reply
#8

Vlw HardWar vc e D+!!!
Reply
#9

O HardWar So Tem Um BUG! Quando o Socio Diamante Morrer Aparece A Mensagem! Todas Vez Que Ele Morre Aparece a Mensagem de!
Socio Diamante:
Captain_Price ON
Reply
#10

Quote:
Originally Posted by lucasbjs0
Посмотреть сообщение
O HardWar So Tem Um BUG! Quando o Socio Diamante Morrer Aparece A Mensagem! Todas Vez Que Ele Morre Aparece a Mensagem de!
Socio Diamante:
Captain_Price ON
Troque OnPlayerSpawn por OnPlayerConnect.

OnPlayerSpawn й chamada toda vez que o jogador nasce, ou seja se ele morrer ele vai ter que dar respawn entгo OnPlayerSpawn vai ser chamada novamente.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)