SA-MP Forums Archive
[HELP] Creating a simple /info system - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Creating a simple /info system (/showthread.php?tid=143526)



[HELP] Creating a simple /info system - borg245 - 23.04.2010

Hey sa-mp forum, I would like to know if there is any way that I can make a simple /info command that displays the following about other players or yourself:

Location
Distance (from you)
Speed
Wanted Level
Team

thanks in advance,
borg245


Re: [HELP] Creating a simple /info system - [HiC]TheKiller - 23.04.2010

Check my sig, it's got most of those functions.


Re: [HELP] Creating a simple /info system - borg245 - 23.04.2010

I find that script a little complex for me. Also the things that I would like aren't included in that filterscript, except ofcourse, the location.
thanks anyways.


Re: [HELP] Creating a simple /info system - [HiC]TheKiller - 23.04.2010

Quote:
Originally Posted by borg245
I find that script a little complex for me. Also the things that I would like aren't included in that filterscript, except ofcourse, the location.
thanks anyways.
Distance: Use GetDistanceBetweenPoints
Speed: GetPlayerVelocity/GetVehicleVelocity
Wanted Level: GetPlayerWantedLevel
Team: Gteam or GetPlayerTeam

That should work =].


Re: [HELP] Creating a simple /info system - borg245 - 23.04.2010

Well, I'm kind of new to scripting..
I was wondering if you can help me start off the code?

thx,
borg245


Re: [HELP] Creating a simple /info system - DJDhan - 23.04.2010

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/info", true, 5)) // 5 is the length of /info
  {
    if(cmdtext[3] == 0)
    {
      SendClientMessage(playerid, white, "USAGE: /info [id]");
      return 1;
    }
    
// YOUR CODE WILL GO HERE

  }