SA-MP Forums Archive
Command for /helpme and /helpers - 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: Command for /helpme and /helpers (/showthread.php?tid=152616)



Command for /helpme and /helpers - Darklom - 05.06.2010

Well this is what I want, a level 5 admin can make people leader of the "Helpers" and the leader (Can be more than one) can /makehelper which a helper has the ability to /unfreeze, /setint, and it can accept /helpme's for common questions which a normal player does /helpme.


Re: Command for /helpme and /helpers - Darklom - 05.06.2010

Anyone know this or could make it?


Re: Command for /helpme and /helpers - VinceQc - 05.06.2010

Код:
  if (strcmp(cmd, "/helpers", true) == 0)
	{
    if(IsPlayerConnected(playerid))
	  {
			foreach (Player,i)
			{
				if(gPlayerLogged[i])
				{
				  if((PlayerInfo[i][pHelper] >= 1 && PlayerInfo[i][pAdmin]==0) || (PlayerInfo[i][pAdmin]>0&&PlayerInfo[i][pHelper]>=1&&PlayerInfo[i][pHidden]==0))
				  {
						GetPlayerName(i, sendername, sizeof(sendername));
				    GiveNameSpace(sendername);
						if(HelperDuty[i] == 0)
						{
							format(string, 256, "[ONLINE]: %s",sendername);
							SendClientMessage(playerid, COLOR_LIGHTYELLOW5, string);
						}
						else
						{
						  format(string, 256, "[ONLINE]: %s (on duty)" ,sendername);
							SendClientMessage(playerid, COLOR_PURPLE, string);
						}
					}
				}
			}
		}
		return 1;
	}
After that, you will need to correctly edit "pHelper" and such to make it work.
For a /helpme, simply makes something that will broadcast on "pHelper" chat.
Good luck.


Re: Command for /helpme and /helpers - Darklom - 06.06.2010

Quote:
Originally Posted by VinceQc
Код:
  if (strcmp(cmd, "/helpers", true) == 0)
	{
    if(IsPlayerConnected(playerid))
	  {
			foreach (Player,i)
			{
				if(gPlayerLogged[i])
				{
				  if((PlayerInfo[i][pHelper] >= 1 && PlayerInfo[i][pAdmin]==0) || (PlayerInfo[i][pAdmin]>0&&PlayerInfo[i][pHelper]>=1&&PlayerInfo[i][pHidden]==0))
				  {
						GetPlayerName(i, sendername, sizeof(sendername));
				    GiveNameSpace(sendername);
						if(HelperDuty[i] == 0)
						{
							format(string, 256, "[ONLINE]: %s",sendername);
							SendClientMessage(playerid, COLOR_LIGHTYELLOW5, string);
						}
						else
						{
						  format(string, 256, "[ONLINE]: %s (on duty)" ,sendername);
							SendClientMessage(playerid, COLOR_PURPLE, string);
						}
					}
				}
			}
		}
		return 1;
	}
After that, you will need to correctly edit "pHelper" and such to make it work.
For a /helpme, simply makes something that will broadcast on "pHelper" chat.
Good luck.
Thanks for this, maybe someone else can help me finish this.


Re: Command for /helpme and /helpers - VinceQc - 06.06.2010

You should do it by yourself if you want to learn buddy.


Re: Command for /helpme and /helpers - Darklom - 06.06.2010

Quote:
Originally Posted by VinceQc
You should do it by yourself if you want to learn buddy.
I'm on the learning stage, but if I want a good one I must get it from someone profesional.