[AJUDA] Texto
#1

Por que quando sou PM e digito um texto o texto nao sai?

PHP Code:
public OnPlayerText(playerid, text[])
{
if(
Profissao[playerid] == Desempregado)
{
new 
string[128], nomej[MAX_PLAYER_NAME];
GetPlayerName(playerid, nomej, sizeof(nomej));
format(string, sizeof(string),"[Civil] %s [%d] diz: %s", nomej, playerid, text);
SendClientMessageToAll(0xFFFFFFAA, string);
{
if(
1 <= Profissao[playerid] <= 2)
{
GetPlayerName(playerid, nomej, sizeof(nomej));
format(string, sizeof(string),"[PolicialMilitar] %s [%d] diz: %s", nomej, playerid, text);
SendClientMessageToAll(0x00FFFFAA, string);
}
}
}
return 
0;
} 
A funcao de PM e esta

PHP Code:
if(1 <= Profissao[playerid] <= 2) 
Reply
#2

Tenta
PHP Code:

if(Profissao[playerid] == //Definiзгo da profissгo PM )
{
...
} 
Reply
#3

Quote:
Originally Posted by Cauezin
View Post
Tenta
PHP Code:

if(Profissao[playerid] == //Definiзгo da profissгo PM )
{
...
} 
N foi
Reply
#4

if(Profissгo == 1 || Profissгo == 2)
Reply
#5

Quote:
Originally Posted by hurubuh
View Post
N foi
Realmente espero que vocк nгo tenha colocado o que eu escrevi ali.....
Reply
#6

PHP Code:
publicOnPlayerText(playerid,text[])
{
if(
Profissao[playerid]==Desempregado)
{
new 
string[128],nomej[MAX_PLAYER_NAME];
GetPlayerName(playerid,nomej,sizeof(nomej));
format(string,sizeof(string),"[Civil] %s [%d] diz: %s",nomej,playerid,text);
SendClientMessageToAll(0xFFFFFFAA,string);
}
else if(
Profissao[playerid]==2)
{
GetPlayerName(playerid,nomej,sizeof(nomej));
format(string,sizeof(string),"[PolicialMilitar] %s [%d] diz: %s", nomej, playerid, text);
SendClientMessageToAll(0x00FFFFAA,*string);*
}
return 
0;
} 
if(1<=Profissao[playerid]<=2) ta estranho pois, numeros maiores que 1 й menores que 2 so numeros quebrados, 1.2 1.5 etc...
Reply
#7

Essa sua verificaзгo de emprego ta muito estranho .
PHP Code:
public OnPlayerText(playerid, text[])
{
    new 
string[128], nomej[MAX_PLAYER_NAME];
    
GetPlayerName(playerid, nomej, sizeof(nomej));
    switch(
Profissao[playerid])
    {
         case 
0:{format(string, sizeof(string),"[Civil] %s [%d] diz: %s", nomej, playerid, text),SendClientMessageToAll(0x00FFFFAA, string);}
         case 
1 .. 2:{format(string, sizeof(string),"[PolicialMilitar] %s [%d] diz: %s", nomej, playerid, text),SendClientMessageToAll(0x00FFFFAA, string);}
    }
    return 
0;
} 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)