Admin Chat < Admins can't see chat or my text, but I can see their chat
#21

Dude, goddamnit... I want to use my OWN script, not yours (did I ask for yours?)! I am asking help for my script.

This one works, only problem is that it says Unknown Command while it is working.

pawn Код:
dcmd_a(playerid, params[])
{
new aText[128],aName[MAX_PLAYER_NAME],string[128];
if(pInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You are not an Administrator with the required level.");
if(!sscanf(params,"s",aText)) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"[USAGE] ''/a [text]''.");

GetPlayerName(playerid,aName,sizeof(aName));
format(string,sizeof(string),"[AdminChat]%s: %s",aName,aText);

for(new i=0;i<=MAX_PLAYERS;i++)
{
  if(pInfo[i][pAdmin] > 0)
    SendClientMessage(i,COLOR_LIGHTBLUE,string);
}
return 1;
}
Reply
#22

Quote:
Originally Posted by DarkPhoenix
Dude, goddamnit... I want to use my OWN script, not yours (did I ask for yours?)! I am asking help for my script.
Wow. Big man has to cuss. Maybe you should read his code. What he is trying to tell you (which you don't understand) is that he gave you his code so you can see how to do it! Do you understand Or do I need to slow down for you? He is trying to let you see how you would fix your command. Get it know? Maybe your server is messed up too. Oh, and since you want YOUR CODE, maybe you should double check everything, make sure you at least TRIED the suggestions given to you.

*P.S. No-one will help you if your a jerk to them, your lucky I am trying to help you.
Reply
#23

Quote:
Originally Posted by NPTechStudios
He is trying to let you see how you would fix your command. Get it know?
I don't see any difference. The only problem is the Error Message.
Reply
#24

EDITED

I have loooked into your code. i remade it with other things
If not working then remove
Код:
[128]
from text

1st of all get: sscanf
2nd :
At
Код:
OnPlayerCommandText
Put
Код:
dcmd(a,1,cmdtext);
Код:
dcmd_a(playerid,params[])
{
	new aName[24],string[128], text[128];
	if(!pInfo[playerid][pAdmin] >= 1)
    {
         SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You are not an Administrator with the required level.");
         return 1;
    }
	if(sscanf(params,"s",text))
	{
		SendClientMessage(playerid,COLOR_LIGHTYELLOW,"[USAGE] ''/a [text]''.");
	    return 1;
	}
	
	GetPlayerName(playerid,aName,sizeof(aName));
	format(string,sizeof(string),"[AdminChat]%s: %s",aName,text);
	
	for(new i=0;i<=MAX_PLAYERS<i++;)
	{
	  if(pInfo[i][pAdmin] >= 1)
      {
	    SendClientMessage(i,COLOR_LIGHTBLUE,string);
      }
	}
	return 1;
}
Reply
#25

Quote:
Originally Posted by GaGlets®
EDITED

I have loooked into your code. i remade it with other things
If not working then remove
Код:
[128]
from text

1st of all get: sscanf
2nd :
At
Код:
OnPlayerCommandText
Put
Код:
dcmd(a,1,cmdtext);
Код:
dcmd_a(playerid,params[])
{
	new aName[24],string[128], text[128];
	if(!pInfo[playerid][pAdmin] >= 1)
    {
         SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You are not an Administrator with the required level.");
         return 1;
    }
	if(sscanf(params,"s",text))
	{
		SendClientMessage(playerid,COLOR_LIGHTYELLOW,"[USAGE] ''/a [text]''.");
	    return 1;
	}
	
	GetPlayerName(playerid,aName,sizeof(aName));
	format(string,sizeof(string),"[AdminChat]%s: %s",aName,text);
	
	for(new i=0;i<=MAX_PLAYERS<i++;)
	{
	  if(pInfo[i][pAdmin] >= 1)
      {
	    SendClientMessage(i,COLOR_LIGHTBLUE,string);
      }
	}
	return 1;
}
Not working, I tried all.
Reply
#26

pawn Код:
dcmd_a(playerid, params[])
{
    new aText[128],aName[MAX_PLAYER_NAME],string[128];
    if(sscanf(params,"s",aText)) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"[USAGE] ''/a [text]''.");
    if(pInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You are not an Administrator with the required level.");
    GetPlayerName(playerid,aName,sizeof(aName));
    format(string,sizeof(string),"[AdminChat]%s: %s",aName,aText);
    for(new i=0;i<=MAX_PLAYERS;i++)
    {
        if(pInfo[i][pAdmin] > 0) return SendClientMessage(i,COLOR_LIGHTBLUE,string);
    }
    return 1;
}
1) sscanf need to be before your admin level check.
2) You dont need "!" in sscanf.
Reply
#27

Quote:
Originally Posted by [03
Garsino ]
pawn Код:
dcmd_a(playerid, params[])
{
    new aText[128],aName[MAX_PLAYER_NAME],string[128];
    if(sscanf(params,"s",aText)) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"[USAGE] ''/a [text]''.");
    if(pInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You are not an Administrator with the required level.");
    GetPlayerName(playerid,aName,sizeof(aName));
    format(string,sizeof(string),"[AdminChat]%s: %s",aName,aText);
    for(new i=0;i<=MAX_PLAYERS;i++)
    {
        if(pInfo[i][pAdmin] > 0) return SendClientMessage(i,COLOR_LIGHTBLUE,string);
    }
    return 1;
}
1) sscanf need to be before your admin level check.
2) You dont need "!" in sscanf.
It works, there is only one problem. I can see other admins talking, but they cannot see me talking or see their own chat with /a.
Reply
#28

bump
Reply
#29

bump
Reply
#30

bump again
Reply
#31

Don't bump after 1 hour.
Reply
#32

Quote:
Originally Posted by SloProKiller
Don't bump after 1 hour.
Alright, but I've been waiting a long time for an answer or someone who wants to help me.
Reply
#33

bump
Reply
#34

Quote:
Originally Posted by DarkPhoenix
bump
Stop bumping your post. We have tried to help you, but you were to stubborn. Use the code on the first-second page. What is the difference between yours and the other. If you cared enough, you wouldn't care about who wrote the code.
Reply
#35

Don't post three times in a row, you'll might get banned.
You screwed up all the fucking gamemode as I already told you on MSN.

Don't try to fix this sh** now, better rewrite your GM first.
Reply
#36

Quote:
Originally Posted by DarkPhoenix
No, I want to use my own but MY command isn't working that's why I asked help.
Relax. He was just trying to help you. Why is your code so special? Is your ego so big you can't bring yourself to use other people's code? Just use it and get over it, doesn't matter whose code it is, as long as it works. More of that attitude and you won't get any help AT ALL from us, or at least from me.

Seriously, chill.

Quote:
Originally Posted by DarkPhoenix
Dude, goddamnit... I want to use my OWN script, not yours (did I ask for yours?)! I am asking help for my script.
By asking for help, people generally get the idea that you want working code, be it you own or someone elses.

Also, learn to adapt. If you see that someone elses code works, why not just look how it works and adapt it for your own?
Reply
#37

With my opinion and 2 others, lets get back to the problem.

1. Do you want to use your code? (You will not get any help on that code)
2. Or would you rather just use the working code? (If it doesn't work, the code writer will possibly help you)

Those are your two choices, so pick one. 1 or 2?
Reply
#38

delete
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)