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;
}
if(1 <= Profissao[playerid] <= 2)
if(Profissao[playerid] == //Definiзгo da profissгo PM )
{
...
}
Tenta
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;
}
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;
}