Posts: 1,276
Threads: 6
Joined: Aug 2014
25.03.2015, 20:07
(
Последний раз редактировалось J0sh...; 26.03.2015 в 01:58.
Причина: Accidently added a extra )
)
Hi, nobody can use commands on a player with the id 1, I don't know why...
pawn Код:
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Player is not online.");
Everybody else 0 & 2+ can be affected by commands.
Solved
Posts: 1,276
Threads: 6
Joined: Aug 2014
Quote:
Originally Posted by -=Dar[K]Lord=-
Try this...
Код:
if(!IsPlayerConnected(id))return SendClientMessage(playerid,COLOR_RED,"Player is not online");
|
I have this check on some commands also. So I don't think that would work.
Posts: 3,133
Threads: 71
Joined: Dec 2013
Reputation:
0
It's possible the ID isn't being set properly. Are you using sscanf? It'd be useful in more code was shown within the context.
Posts: 1,276
Threads: 6
Joined: Aug 2014
pawn Код:
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "/test [id]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Player is not online.");
Posts: 1,276
Threads: 6
Joined: Aug 2014
How is that possible? I haven't defined anything along the lines "INVALID_PLAYER_ID" I just checked, twice.
Posts: 1,276
Threads: 6
Joined: Aug 2014
Hmmm, I'll check it.
EDIT: Thank you!