/find command
#1

Hello does somebody know a link or script so I can use /find [ID] for only 10 sec. Thanks!
Reply
#2

Lethat administration gives you this

Код:
dcmd_getid(playerid,params[]) {
	if(!strlen(params)) return SendClientMessage(playerid,blue,"Correct Usage: /getid [part of nick]");
	new found, string[128], playername[MAX_PLAYER_NAME];
	format(string,sizeof(string),"Searched for: \"%s\" ",params);
	SendClientMessage(playerid,blue,string);
	for(new i=0; i <= MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
	 		GetPlayerName(i, playername, MAX_PLAYER_NAME);
			new namelen = strlen(playername);
			new bool:searched=false;
	  	for(new pos=0; pos <= namelen; pos++)
			{
				if(searched != true)
				{
					if(strfind(playername,params,true) == pos)
					{
		        found++;
						format(string,sizeof(string),"%d. %s (ID %d)",found,playername,i);
						SendClientMessage(playerid, green ,string);
						searched = true;
					}
				}
			}
		}
	}
	if(found == 0) SendClientMessage(playerid, lightblue, "No players have this in their nick");
	return 1;
}
And please search before posting
Reply
#3

Give us more information about the command.
Reply
#4

He means to set a marker onto another player, for 10 seconds. Try Carlitos, use search.
Reply
#5

Why everytime everybody tell me to search, I do that.
and thats not an answer on my question, but more about command:
I maked a pickup, if player go into that pickup it will say, Use /Find [ID] if you want find a player for 10 sec,
I found this:
Код:
forward CheckpointVerplaatsen(playerid, otherplayer);
new CheckpointTimerID;

public OnPlayerCommandText(playerid, cmdtext[])
{
  new cmd[256], idx, tmp[256];
  cmd = strtok(cmdtext, idx);
  if (strcmp("/find", cmdtext, true, 10) == 0)
  {
    new FindPlayerID;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
      SendClientMessage(playerid, KLEUR, "Gebruik: /find [ID]!");
        return 1;
    }
    FindPlayerID = strval(tmp);
     if(!IsPlayerConnected(FindPlayerID))
    {
       SendClientMessage(playerid, KLEUR, "Speler is niet online!");
       return 1;
    }
    new Float:px, Float:py, Float:pz;
    GetPlayerPos(FindPlayerID, px, py, pz);
    SetPlayerCheckpoint(playerid, px, py, pz, 10.0);
    CheckpointTimerID = SetTimerEx("CheckpointVerplaatsen", 1000, true, "ii", playerid, FindPlayerID);
    return 1;
  }
  if(strcmp("/stopfind", cmdtext, true))
  {
    KillTimer(CheckpointTimerID);
    return 1;
  }
  return 0;
}
public CheckpointVerplaatsen(playerid, otherplayer)
{
  new Float:px, Float:py, Float:pz;
  GetPlayerPos(otherplayer, px, py, pz);
  SetPlayerCheckpoint(playerid, px, py, pz, 10.0);
}
This will move the checkpoint every sec, put if I try it ingame, it doesnt set a checkpoint on the player, is there something wrong with this?
Reply
#6

Yea I need, it still doesn't work
Reply
#7

hi

this script will report to you thedistance and the heading/cardinal point where to look for a player
http://snoob-community.wikispaces.com/loc.pwn
it wont do a marker that stay for 10 second like you asked.
maybe this will help anyway. Good Luck in your search.
Reply
#8

Thanks, but I if I find myself it doesn't work, might i need to find another i will test that later,
Reply
#9

Please could nobody tell me a good /find command? because this ones didn't work, might its my fault, but I''m still testing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)