[HELP] code for if player online
#1

I have some offcommands and when I type some of that command I want if then a player online then it print me somme message that can't check if the player online if you know what I mean. Thanks
Reply
#2

Use the IsPlayerConnected native function. Since you're looking for when they're NOT connected, it would be !IsPlayerConnected.

e.g.
pawn Код:
if(!IsPlayerConnected(playerid))
If you need more help, please reply back.
Reply
#3

Quote:
Originally Posted by Luca12
Посмотреть сообщение
I have some offcommands and when I type some of that command I want if then a player online then it print me somme message that can't check if the player online if you know what I mean. Thanks
Код:
new pID; //or change pID to what you are using
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, white, "Invalid PlayerID or the PlayerID is not online");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)