Author Topic: chat only for VIPs  (Read 3289 times)

0 Members and 1 Guest are viewing this topic.

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
chat only for VIPs
« on: July 20, 2012, 07:17:55 pm »
[pawn]else if ( strcmp( cmd, "vip", true ) == 0 )
   {
      tmp = strtok( cmdtext, idx );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else if ( !strlen( tmp ) ) { SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c vip [Message]" ); }
      else
      {
         new szMsg[ 128 ];
         format( szMsg, 128, "** vip %s: %s", gPlayers[ playerid ], cmdtext[ 3 ] );
         SendClientMessageToAll( RED, szMsg );
      }
      return 1;
      }[/pawn]

Offline LisKa

  • Street Thug
  • *
  • Posts: 8
  • Pawn, Squirrel Scripter [Owner of Vice-Role Play]
    • View Profile
    • Vice-Role Play Server
Re: chat only for VIPs
« Reply #1 on: July 20, 2012, 07:33:12 pm »
Use snippet showroom.

Offline asderwin

  • Street Thug
  • *
  • Posts: 15
    • View Profile
Re: chat only for VIPs
« Reply #2 on: July 23, 2012, 10:39:16 pm »

else if ( strcmp( cmd, "t", true ) == 0 ){
for(i = 0; i < MAX_PLAYERS; i++)
{
new Float:tX,Float:tY,Float:tZ;
GetPlayerPos(playerid,tX,tY,tZ);
if(PlayerToPoint(15.0,i,tX,tY,tZ))
{
new str[ 128 ];
format(str,128, "[%s]Dice:%s.",gPlayers[ playerid ],cmdtext[2]);
SendClientMessage(i,COLOR_YELLOW,str);

}
}
   return 1;
   }


public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
   {
      new Float:oldposx, Float:oldposy, Float:oldposz;
      new Float:tempposx, Float:tempposy, Float:tempposz;
      GetPlayerPos(playerid, oldposx, oldposy, oldposz);
      tempposx = (oldposx -x);
      tempposy = (oldposy -y);
      tempposz = (oldposz -z);
      if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
      {
        return 1;
      }
   }
  return 0;
}

agradescan por lo menos los noobs

{ (Abraham_Blanco) && [Professsional-Spawno-Scripts] }



Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: chat only for VIPs
« Reply #3 on: July 24, 2012, 06:52:41 am »
buena Abraham the best.....  en serio bajale los humos a tu cabeza "dilson version venezolano"
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: chat only for VIPs
« Reply #4 on: July 24, 2012, 04:36:56 pm »
"SendClientMessageToAll" isn't set to send a message to all online players ?

You need to use "SendClientMessage" to all VIPs online .

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.