[FilterScript] Active/Unactive /b For Roleplay
#1

Код:
#include <a_samp>
#include <zcmd>
#include <color>
#include <sscanf2>
#include <foreach>

new nob[MAX_PLAYERS];

public OnFilterScriptInit()
{
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

stock ProxDetector(Float:radi, playerid, string[],color)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    foreach(Player,i)
    {
        if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
        {
            SendClientMessage(i,color,string);
        }
    }
}
CMD:nob(playerid, params[])
{
	foreach(Player, i)
{
      if(nob[i] == 0)
      {
            SendClientMessage(playerid, -1, "You Enable Player To Use /b");
            nob[i] = 1;
      }
      else if(nob[i] == 1)
     {
            SendClientMessage(playerid, -1, "Yo Unable Player To Use /b");
            nob[i] = 0;
     }
}
	return 1;
}

CMD:b(playerid, params[])
{
	if(nob[playerid] == 0)
	{
	    SendClientMessage(playerid, COLOR_YELLOW, "You Can't /b Full IC Please");
	}
	else
	{
	    new pname[MAX_PLAYER_NAME];
	    GetPlayerName(playerid,pname, sizeof(pname));
	    new string[1280];
	    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /b [OOC CHAT");
	    format(string, sizeof(string), "(( Local OOC Chat %s : %s ))",pname, params);
		ProxDetector(30.0, playerid, string, -1);
	}
	return 1;
}
Tutorial :
1. Download The File
2. Put File To Filterscripts
3. Open server.cfg
4. write filterscripts nob
5. Up Your Server
6. Done, for active /b use /nob

Create By Me.

Newbie scripter :3
Reply
#2

Nice bro
Reply
#3

Edited, this fix version
Reply
#4

good man keep up
Reply
#5

You even didn't give us the Color Include -_-
Why don't you define the Colors ?

Anything else is you're not translate that script to english.
That still indonesian .

Anyway, it's simple and good for newbie .
Reply
#6

Use English Man!! -_-
Reply
#7

Sorry man i forgot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)