SA-MP Forums Archive
/hfind Command help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /hfind Command help (/showthread.php?tid=528196)



/hfind Command help - JordanSmith - 26.07.2014

Hello all, I'm looking for a command that tracks a player something like /hfind.....

Thanks.


Re: /hfind Command help - driftpower - 26.07.2014

like a gps system?


Re: /hfind Command help - JordanSmith - 26.07.2014

Quote:

like a gps system?

Yes. but only the Police can use it.


Re: /hfind Command help - Clad - 26.07.2014

pawn Код:
if(strcmp(cmd, "/whereis", true) == 0) if(Logged[playerid] == 1)
{
if(Cop[playerid] || FBI[playerid] || SWAT[playerid]) // Change those.
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "( ! ) USAGE: /whereis [playerid]");
return 1;
}
giveplayerid = strval(tmp);
if(IsPlayerConnected(giveplayerid))
{
new playasd[MAX_PLAYER_NAME];
GetPlayerName(playerid,playasd,sizeof(playasd));
GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer));
new blah[128];
GetPlayer2DZone(giveplayerid, blah, sizeof(blah));
format(string, 128, "( %s ): %s > %s", playasd,giveplayer,blah);
SendClientMessage(playerid, COLOR_GREEN,string);
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED,"Invalid Player ID!");
}
return 1;
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"SERVER: Unknown command.");
}
return 1;
}



Re: /hfind Command help - JordanSmith - 26.07.2014

Quote:

pawn Code:
if(strcmp(cmd, "/whereis", true) == 0) if(Logged[playerid] == 1)
{
if(Cop[playerid] || FBI[playerid] || SWAT[playerid]) // Change those.
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "( ! ) USAGE: /whereis [playerid]");
return 1;
}
giveplayerid = strval(tmp);
if(IsPlayerConnected(giveplayerid))
{
new playasd[MAX_PLAYER_NAME];
GetPlayerName(playerid,playasd,sizeof(playasd));
GetPlayerName(giveplayerid,giveplayer,sizeof(givep layer));
new blah[128];
GetPlayer2DZone(giveplayerid, blah, sizeof(blah));
format(string, 128, "( %s ): %s > %s", playasd,giveplayer,blah);
SendClientMessage(playerid, COLOR_GREEN,string);
return 1;
}
else
{
SendClientMessage(playerid,COLOR_RED,"Invalid Player ID!");
}
return 1;
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"SERVER: Unknown command.");
}
return 1;
}

Thanks, this works!