03.09.2012, 04:42
Hello, I would like to know how can I use part of name in my commands like for example the command stats. If a player name is "HowCanIMakeIt" and I use "/stats make" or "/stats owcani" It show his stats and if there multiple names ill just make a error saying "multiple names found".
My second question is if I use a command on a non-connected player, how can I make it show the invalid name like if I use /stats helloyou, I'll will return "helloyou is not connected to the server."
It would be awsome if you could give me some tips how to make it.
This is my try for the second question.
My second question is if I use a command on a non-connected player, how can I make it show the invalid name like if I use /stats helloyou, I'll will return "helloyou is not connected to the server."
It would be awsome if you could give me some tips how to make it.
This is my try for the second question.
pawn Код:
if(!IsPlayerConnected(target))
{
GetPlayerName(target,pname,MAX_PLAYER_NAME);
format(string,sizeof(string),"The Player %s is not connected to the server.",pname);
SendClientMessage(playerid,COLOR_RED,string);
return 1;
}