text problem
#1

I found a little problem for me on my server. When a player isnt admin, if he sends a message only he sees it. If a player is an admin its fine, i'm using SeifAdmin but its a little bit modified (i am using a code to make admins talk a different color)

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new cmd[128];
	new tmp[128];
	new idx;	if(AccountInfo[playerid][AdminLevel] >= 1)
	{
	GetPlayerName(playerid,name,sizeof name);
	format(txt,512,"%s: %s",name,text);
	SendClientMessageToAll(GREEN,txt);
	return 0;
	}
here's the thing that happens

Heres what happens without admin:


It goes as >> Message
__________________________________________________ _________________
Heres what happens with admin:


It's fine with admin.
__________________________________________________ _________________
I get the same error with PMs, but this happens with or without admin:




Reply
#2

Any help ?
Reply
#3

What's your whole OnPlayerText?
Reply
#4

Ehm,

Код:
public OnPlayerText(playerid, text[])
{
	new txt[512];
	new name[MAX_PLAYER_NAME];
	if(question[playerid] == 1)
	{
	if(strcmp(text, "accept", true) == 0)
	{
  new Float:x,Float:y,Float:z;
	GetPlayerPos(getid[playerid],x,y,z);
	SetPlayerPos(playerid,x+2,y+2,z);
	question[playerid] = 0;
	return 0;
	}
	if(strcmp(text, "deny", true) == 0)
	{
	SendClientMessage(getid[playerid],ORANGE,"The Player denied to come.");
	question[playerid] = 0;
	return 0;
	}
	else
	SendClientMessage(playerid,ORANGE,"Type accept or deny!");
	return 0;
	}
	else
	
		if(AccountInfo[playerid][AdminLevel] >= 1)
	{
	GetPlayerName(playerid,name,sizeof name);
	format(txt,512,"%s: %s",name,text);
	SendClientMessageToAll(GREEN,txt);
	return 0;
	}
	if(AFKCheck[playerid] >= AFK_TIME)
  OnPlayerBackOfAFK(playerid);
  AFKCheck[ playerid ] = 0;
	if(AccountInfo[playerid][Logged] == 0)
	{
		SendClientMessage(playerid,RED,"You need to be logged in to talk.");
		return 0;
	}
	else
	if (AccountInfo[playerid][Mute] == 1)
	{
		SendClientMessage(playerid, RED, "You are muted! You cannot talk.");
		return 0;
	}
	return 1;
}
Reply
#5

any ideas ? :[
Reply
#6

sorry for the bump, Please help
Reply
#7

hello ?
Reply
#8

please
Reply
#9

This is wrong
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128];
    new tmp[128];
    new idx;    if(AccountInfo[playerid][AdminLevel] >= 1)
    {
    GetPlayerName(playerid,name,sizeof name);
    format(txt,512,"%s: %s",name,text);
    SendClientMessageToAll(GREEN,txt);
    return 0;
    }
Why is it under OnPlayerCommandText?
Reply
#10

Quote:
Originally Posted by -The_Badger-
This is wrong
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128];
    new tmp[128];
    new idx;    if(AccountInfo[playerid][AdminLevel] >= 1)
    {
    GetPlayerName(playerid,name,sizeof name);
    format(txt,512,"%s: %s",name,text);
    SendClientMessageToAll(GREEN,txt);
    return 0;
    }
Why is it under OnPlayerCommandText?
i dunno so i move it to onplayertext?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)