[Tutorial] How to make Admin Chat
#1

<Removed>
Reason:bad tutorial sorry
Reply
#2

Copy paste rather than tutorial

pawn Код:
stock MessageToAdmins(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) == 1) if(pInfo[i][Adminlevel] >= 1) SendClientMessage(i, color, string);//if player is connected and he's admin level higher then 1 he will get this message
    return 1;
}
Nobody can even see the explanation, the explanation is at the end
Also, you used pInfo[pid][Adminlevel]
This is a custom variable, what if I have PlayerInfo instead of pInfo?

A more suitable explanation would be

pawn Код:
stock MessageToAdmins(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++) // Loops through all players
    {
          if(IsPlayerConnected(i) == 1) // Checks if the player is connected
          {
                if(IsPlayerAdmin(playerid)) SendClientMessage(i, color, string);//if player is connected and he's admin level higher then 1 he will get this message
          }
    }
    return 1;
}
Same for second part, you haven't even explained.
And that code wouldn't even compile
You used SendMessageToAdmins in the second code while your original stock is MessageToAdmins
You also didn't define LIGHTBLUE color
And you didn't explain why we use text[1] and not just text.

Incomplete tutorial.
Reply
#3

sorry for my mistakes i made it so fast without using Pawno
I will make a new one
Reply
#4

Quote:
Originally Posted by RuthlessThuG
Посмотреть сообщение
sorry for my mistakes i made it so fast without using Pawno
I will make a new one
It's okay. PM me anytime if you need any help with any tutorial or anything, and whenever you're making a tutorial, be sure to compile it in a script without any special includes.
Reply
#5

Even though I made small mistakes with writhing it
But it was the right way

anyway it will get deleted i will sens a message to somone
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)