30.01.2016, 05:38
You are checking if the number of arguments are 3:
And then sending an empty string (str).
Of course if you see your example, the number of arguments is 3 because the arg count starts from Natural numbers. So in your example, PlayeName(playeid) is the 3rd argument, so according to your code, it will send a empty client message. (the number should be 2, in the first check)
And also, you can directly send your message if there is no args like this:
pawn Код:
if((args = numargs()) == 3)
Of course if you see your example, the number of arguments is 3 because the arg count starts from Natural numbers. So in your example, PlayeName(playeid) is the 3rd argument, so according to your code, it will send a empty client message. (the number should be 2, in the first check)
And also, you can directly send your message if there is no args like this:
Код:
foreach(new i : Player) { if(!IsSpawned[i]) continue; if(PlayerInfo[i][Admin_Level] > 1) SendClientMessage(i, color, text); }