Jump to content
  • 0

pomoc [Help] Admin Chat


xenon

Dotaz

 

Čaute potreboval by som poradiť mam spravený admin chat:

 

 

if(cmdtext[1] == '/' && alevel[playerid] > 0)
{
new string[128];
strdel(cmdtext,0,1);
format(string, 128,"[Admin Chat] %s (ID: %d): %s", PlayerName(playerid),playerid, cmdtext);
SendMessageToAdmins(COLOR_GREEN, string);
return 1;
}

 

A mam taky problem že keď napíešem na serveri toto // test tak to napíše do chatu takto:

[Admin Chat] xxx (ID: 0): /test

Proste tam píše aj to / neviete prečo ? :)

Link to comment
Share on other sites

4 odpovědí na tuto otázku

Recommended Posts

  • 0

if(cmdtext[1] == '//' && alevel[playerid] > 0)
{
new string[128];
strdel(cmdtext,0,2);
format(string, 128,"[Admin Chat] %s (ID: %d): %s", PlayerName(playerid),playerid, cmdtext);
SendMessageToAdmins(COLOR_GREEN, string);
return 1;
}

 

takto by to mělo jít ;):d

Link to comment
Share on other sites

  • 0

if(cmdtext[1] == '//' && alevel[playerid] > 0)
{
new string[128];
strdel(cmdtext,0,2);
format(string, 128,"[Admin Chat] %s (ID: %d): %s", PlayerName(playerid),playerid, cmdtext);
SendMessageToAdmins(COLOR_GREEN, string);
return 1;
}

 

takto by to mělo jít ;):d

 

error 027: invalid character constant

 

Už som to opravil môžte LOCK

Link to comment
Share on other sites

  • 0

cmdtext lze pouzit i NEodzacatku.

Tedy pokud potrebujes preskocit privni znak, pouzij cmdtext[1]

format(string, 128,"[Admin Chat] %s (ID: %d): %s", PlayerName(playerid),playerid, cmdtext[1]);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...