19.02.2013, 16:01
Copy paste rather than tutorial
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
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.
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;
}
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;
}
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.