Author Topic: Clan / Name tag detection.  (Read 201 times)

Offline Lordz

  • Beta Tester
  • Sr. Member
  • ****
  • Posts: 1238
  • Location: Earth
    • RBTDM
Clan / Name tag detection.
« on: December 19, 2012, 05:31:42 pm »
Clan / Tag detection

Hey,

I was just feeling bored and thought of coding something. So, I scripted a clan detection script. Basically this is a clan detection script which detects the name tag when a player connects to the server. For example, if a player named '[YG]Simon' connects, it will detect that the player is using the server clan: i.e: '[YG]'.

This script is built in two callbacks which is for server clan and server official gang.
Code: [Select]
public OnPlayerConnectWithServerClanTag(playerid)
public OnPlayerConnectWithServerGangTag(playerid)

Example:
Code: [Select]
#define SERVER_CLAN "[Test]" //Defining a config and now the clan is set to '[Test]'.
public OnPlayerConnectWithServerClanTag(playerid)
{
 SetTimerEx("DetectLogin", 60000, false, "d", playerid);
 //Runs a timer to 1 minute.
 return true;
}

#define Lpublic(%0)  forward(%0);(public(%0))

Lpublic DetectLogin(playerid) //After the 1 min timer.
{
 if(IsClanForPlayerActivated(playerid)) return 1; //If Clan var is activated it don't do anything.
 else return Kick(playerid); //Else it will kick player.
 return 1;
}

Code will be sent to YoUnG_MoNeY  (Will forward within 5 mins, fixing bugs xD!)


Might be useful, i guess.
« Last Edit: December 25, 2012, 09:43:06 pm by Lordz »

Share on Bluesky Share on Facebook


Offline LeGGGeNNdA

  • Sr. Member
  • *
  • Posts: 507
  • Mapping, Mapping, Mapping Everything :P
  • Location: Albania
Re: Clan / Name tag detection. (For [YG] and [RD])
« Reply #1 on: December 19, 2012, 05:33:39 pm »
Perfect !!!
Life is like riding a bicycle. To keep your balance, you must keep moving

Counter_force

  • Guest
Re: Clan / Name tag detection. (For [YG] and [RD])
« Reply #2 on: December 19, 2012, 06:10:53 pm »
Cool !

Offline [RD]ReVenGeR

  • Level 7
  • Sr. Member
  • *
  • Posts: 486
  • ╦ Administrator ╦
  • Location: Earth
    • YoUnG Generations Gaming
  • In-Game: [RD]ReVenGeR
Re: Clan / Name tag detection. (For [YG] and [RD])
« Reply #3 on: December 19, 2012, 07:00:56 pm »
That's one of the great work.
Thumbs up.
YoUnG Generations Gaming A better experience of LIFE

Rules are strict !

Offline BlueSky

  • Management
  • Sr. Member
  • *
  • Posts: 689
    • YG-Gaming
  • In-Game: Cobra
Re: Clan / Name tag detection. (For [YG] and [RD])
« Reply #4 on: December 19, 2012, 07:10:14 pm »
Includes?

Offline Lordz

  • Beta Tester
  • Sr. Member
  • ****
  • Posts: 1238
  • Location: Earth
    • RBTDM
Re: Clan / Name tag detection. (For [YG] and [RD])
« Reply #5 on: December 19, 2012, 07:19:15 pm »
Thanks all. :)
@Cobra, No it don't require any other includes except SA-MP's basic include as it's for a SA-MP client. And this snippet, can be used as an include and it's also coded for using it as an include which supports every SA-MP scripts.
« Last Edit: December 19, 2012, 07:24:10 pm by Lordz »

Offline Adi

  • Level 5
  • Sr. Member
  • *
  • Posts: 583
  • Friendly and Experienced Level 5 Admin on YG 3E
  • Location: ISB,Pakistan
Re: Clan / Name tag detection. (For [YG] and [RD])
« Reply #6 on: December 19, 2012, 07:48:56 pm »
Awesome work bro keep it up

Offline [YG]DaRk

  • Jr. Member
  • *
  • Posts: 125
  • [RD]MoThEr is coming :O
  • Location: barbados
Re: Clan / Name tag detection. (For [YG] and [RD])
« Reply #7 on: December 20, 2012, 03:38:06 am »
nice cratos pic adi and cool lordz

cratos pic will be stolen sum day

Offline Lordz

  • Beta Tester
  • Sr. Member
  • ****
  • Posts: 1238
  • Location: Earth
    • RBTDM
Re: Clan / Name tag detection. (For [YG] and [RD])
« Reply #8 on: December 20, 2012, 03:04:31 pm »
Thanks Adi and DaRk. I'm glad that YoUnG_MoNeY told good one + he'll add it in the next update. :)

Offline [RD]Hawk

  • VIP Level 2
  • Sr. Member
  • *
  • Posts: 889
  • One step closer to u.. One step closer to ur death
  • Location: England, London, Eastbourne
Re: Clan / Name tag detection. (For [YG] and [RD])
« Reply #9 on: December 21, 2012, 04:20:18 am »
Nice


Also known for the famous, not very used quote

LiKe A Bo$$

Offline Lordz

  • Beta Tester
  • Sr. Member
  • ****
  • Posts: 1238
  • Location: Earth
    • RBTDM
Re: Clan / Name tag detection. (For [YG] and [RD])
« Reply #10 on: December 21, 2012, 08:13:47 pm »
Thanks. :)