28.11.2013, 18:44
Hi!
Can some one help me with this?
I want that player will type /find [playername-not playerid] it will show him players with that words in name in dialog
>Like this but the code done work
Can some one help me with this?
I want that player will type /find [playername-not playerid] it will show him players with that words in name in dialog
>Like this but the code done work
PHP код:
CMD:find(playerid,params[])
{
new name;
new count = 0;
if(sscanf(params, "u", name)) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /Find [PlayerName]");
foreach (new i : Player)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i,name, sizeof(name));
new Find[1000];
format(Find, sizeof(Find), "{FFFFFF}%s(ID:%d)", name, i);
ShowPlayerDialog(playerid,9001,DIALOG_STYLE_LIST,"Find",Find,"Ok","");
}
}
return 1;
}