Author Topic: [SNIPPET]Team System Full ANd Final By Me  (Read 5460 times)

0 Members and 1 Guest are viewing this topic.

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
[SNIPPET]Team System Full ANd Final By Me
« on: March 12, 2013, 06:19:09 pm »
beginning
[pawn]new TEAM[MAX_PLAYERS];
new REQUEST[MAX_PLAYERS];
new DENY[MAX_PLAYERS];[/pawn]

now in onplayerspawn when team-mate spawn he got spawn to you
[pawn]new plr;
new Float:x, Float:y, Float:z;

      if(TEAM[playerid] == 1 || TEAM[ plr ] == 1  ) {

GetPlayerPos( plr, x, y, z );
SetPlayerPos( playerid, x, y + 1.0, z, 0, 0 );
}[/pawn]

now cmds
[pawn]            else if ( strcmp( cmd, "!team", true ) == 0 )
{
new plr;
tmp = strtok( cmdtext, idx );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREY, "Usage: !team [Nick/ID]" );     
else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );   
else if(TEAM[ plr ] == 1) SendClientMessage(playerid, GREEN," Player Is ALready In A Team");
else
{
SendClientMessage(plr, RED, " Player Wants To Team WIth You do /c accept or deny");
REQUEST[ plr ] = 1;
 }
      return 1;
   }
            else if ( strcmp( cmd, "!leaveteam", true ) == 0 )
{
new plr;
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if(REQUEST[playerid] == 0) SendClientMessage(playerid, GREEN," You are not in any team");
else
{
SendClientMessage(plr, RED, " Player Dont Want TO Team With You ANyMore");
TEAM[ plr ] = 0;
 }
      return 1;
   }
               else if ( strcmp( cmd, "!accept", true ) == 0 )
{
new plr;
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if(REQUEST[playerid] == 0) SendClientMessage(playerid, GREEN," You DOnt Have A Request");
else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );   
else
{
SendClientMessage(plr, RED, " You ARe Now In Team");
TEAM[ plr ] = 1;
TEAM[ playerid ] = 1;
GetPlayerPos( plr, x, y, z );
SetPlayerPos( playerid, x, y + 1.0, z, 0, 0 );
 }
      return 1;
   }
                  else if ( strcmp( cmd, "!deny", true ) == 0 )
{
new plr;
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if(REQUEST[playerid] == 0) SendClientMessage(playerid, GREEN," You DOnt Have A Request");
else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );   
else
{
SendClientMessage(plr, RED, " You ARe Not In Team");
TEAM[ plr ] = 0;
TEAM[ playerid ] = 0;
DENY[ playerid ] = 1;
DENY[ plr ] = 1;
 }
      return 1;
   }[/pawn]

CREDITS = SPIDER

SAW A BUG FEEL FREE TO POST


My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline VC[88]PD

  • Wiseguy
  • **
  • Posts: 52
    • View Profile
Re: [SNIPPET]Team System Full ANd Final By Me
« Reply #1 on: March 13, 2013, 11:42:22 am »
SendClientMessage(plr, RED, " Player Wants To Team WIth You do /c accept or deny");
should be
SendClientMessage(plr, RED, " Player Wants To Team WIth You do !accept or deny");

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: [SNIPPET]Team System Full ANd Final By Me
« Reply #2 on: March 13, 2013, 11:51:33 am »
i change it
sorry
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline VC[88]PD

  • Wiseguy
  • **
  • Posts: 52
    • View Profile
Re: [SNIPPET]Team System Full ANd Final By Me
« Reply #3 on: March 13, 2013, 12:39:29 pm »
ok,it's a good cmd

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: [SNIPPET]Team System Full ANd Final By Me
« Reply #4 on: March 13, 2013, 12:52:27 pm »
THANKS MEN
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: [SNIPPET]Team System Full ANd Final By Me
« Reply #5 on: March 13, 2013, 04:44:01 pm »
NOOOOO.. Not another GUPS SNIPPET..  >:(
I'm beginning to feel like a Lag God, Lag God

Offline Doom

  • Made Man
  • ***
  • Posts: 105
    • View Profile
Re: [SNIPPET]Team System Full ANd Final By Me
« Reply #6 on: March 13, 2013, 05:04:19 pm »
NOOOOO.. Not another GUPS SNIPPET..  >:(

He always Fails...  :-\  ;)

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: [SNIPPET]Team System Full ANd Final By Me
« Reply #7 on: March 13, 2013, 05:11:34 pm »
wtf this is for each servers just you need the correct include :P
fuzzie and doom
you never think to do this
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline USA.Ghost

  • Street Thug
  • *
  • Posts: 42
  • Pawn Scripter, IT Professional
    • View Profile
    • NE Clan Official forum
Re: [SNIPPET]Team System Full ANd Final By Me
« Reply #8 on: March 15, 2013, 08:43:46 am »
beginning
[pawn]new TEAM[MAX_PLAYERS];
new REQUEST[MAX_PLAYERS];
new DENY[MAX_PLAYERS];[/pawn]

now in onplayerspawn when team-mate spawn he got spawn to you
[pawn]new plr;
new Float:x, Float:y, Float:z;
if (TEAM[playerid] != 255) {
      while (TEAM[ plr ] == playerid  ) {
      plr++
}
while (TEAM[ plr ] != playerid ) {
GetPlayerPos(plr, x, y, z);
SetPlayerPos(playerid, x, y, z, 0, 0);
}
}[/pawn]

now cmds
[pawn]            else if ( strcmp( cmd, "!team", true ) == 0 )
{
new plr;
tmp = strtok( cmdtext, idx );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREY, "Usage: !team [Nick/ID]" );     
else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );   
else if(TEAM[ plr ] != 255) SendClientMessage(playerid, GREEN," Player Is ALready In A Team");
else
{
SendClientMessage(plr, RED, " Player Wants To Team WIth You do /c accept or deny");
REQUEST[ plr ] = 1;
 }
      return 1;
   }
            else if ( strcmp( cmd, "!leaveteam", true ) == 0 )
{
new plr;
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if(REQUEST[playerid] == 0) SendClientMessage(playerid, GREEN," You are not in any team");
else
{
SendClientMessage(plr, RED, " Player Dont Want TO Team With You ANyMore");
TEAM[ plr ] = 255;
TEAM[ playerid ] = 255;
 }
      return 1;
   }
               else if ( strcmp( cmd, "!accept", true ) == 0 )
{
new plr;
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if(REQUEST[playerid] == 0) SendClientMessage(playerid, GREEN," You DOnt Have A Request");
else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );   
else
{
SendClientMessage(plr, RED, " You ARe Now In Team");
TEAM[ plr ] = playerid;
TEAM[ playerid ] = plr;
GetPlayerPos( plr, x, y, z );
SetPlayerPos( playerid, x, y + 1.0, z, 0, 0 );
 }
      return 1;
   }
                  else if ( strcmp( cmd, "!deny", true ) == 0 )
{
new plr;
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if(REQUEST[playerid] == 0) SendClientMessage(playerid, GREEN," You DOnt Have A Request");
else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );   
else
{
SendClientMessage(plr, RED, " You ARe Not In Team");
TEAM[ plr ] = 255;
TEAM[ playerid ] = 255;
DENY[ playerid ] = 1;
DENY[ plr ] = 1;
 }
      return 1;
   }[/pawn]

CREDITS = SPIDER(MAIN IDEA) AND USA.GHOST(FIX BUG TO ONLY WORK WITH PLAYERID 0)

SAW A BUG FEEL FREE TO POST



Click the Click Here button on top to earn free cash by completing offers, surveys, refer others and much more

Click here to join my clan

Offline [VN]truon_chan1

  • Street Thug
  • *
  • Posts: 13
  • [VC]88[PD], best friend FOREVER.
    • View Profile
Re: [SNIPPET]Team System Full ANd Final By Me
« Reply #9 on: March 16, 2013, 04:07:49 am »
not bad