[Tutorial] How to make Admin Chat - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (
https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] How to make Admin Chat (
/showthread.php?tid=417064)
How to make Admin Chat -
RuthlessThuG - 19.02.2013
<Removed>
Reason:bad tutorial sorry
Re: How to make Admin Chat -
CreativityLacker - 19.02.2013
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.
Re: How to make Admin Chat -
RuthlessThuG - 19.02.2013
sorry for my mistakes i made it so fast without using Pawno
I will make a new one
Re: How to make Admin Chat -
CreativityLacker - 19.02.2013
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.
Re: How to make Admin Chat -
RuthlessThuG - 19.02.2013
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