Author Topic: I need help with command /c bringall  (Read 6963 times)

0 Members and 3 Guests are viewing this topic.

Offline shaheersa

  • Street Thug
  • *
  • Posts: 17
    • View Profile
I need help with command /c bringall
« on: December 26, 2012, 12:58:53 am »
Hi scripters,
i need some help
/c mute [player] = player cant write anything in chat ---------------------I dont need this command
/c reloadscript = reload the script without needing to restart the server --------------------------- I fixed it myself
/c bringall

Thanks
« Last Edit: January 02, 2013, 01:53:17 pm by shaheersa »

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: I need help with command /c mute and /c reloadscript
« Reply #1 on: December 26, 2012, 05:44:01 am »
/c mute = Impossible in Pawn, Possible in Squirrel
/c reloadscript = Impossible in Pawn, Possible in Squirrel
I'm beginning to feel like a Lag God, Lag God

Offline shaheersa

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Re: I need help with command /c mute and /c reloadscript
« Reply #2 on: December 26, 2012, 12:07:00 pm »
/c mute is possible, i saw it on non-sq(pawn) servers
well im not sure about /c reloadscript

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: I need help with command /c mute and /c reloadscript
« Reply #3 on: December 26, 2012, 03:14:57 pm »
/c mute = Impossible in Pawn, Possible in Squirrel
/c reloadscript = Impossible in Pawn, Possible in Squirrel
1 cuestion mute is possible in pawn but only.work if the player use t and write the message
but if player use /me or another command not work
reload.script?
not is possible reload script in any script sq or pawn
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: I need help with command /c mute and /c reloadscript
« Reply #4 on: December 26, 2012, 03:17:47 pm »
[pawn]   else if(strcmp(cmd,"mute",true) == 0)
   {
   IsPlayerAdmin(playerid);
   {
      new plr;
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      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_RED,"USAGE: /c mute [Nick/ID]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
      else {
      if(PlayerInfo[plr][Muted] == 0)
      {
      PlayerInfo[plr][Muted] = 1;
      new str[256];
      format(str,sizeof(str),"ADMIN %s Muted %s for a long time...",gPlayers[playerid],gPlayers[plr]);
      SendClientMessageToAll(COLOR_WHITE,str);
      SendClientMessage(plr,COLOR_RED,"Stop talking or you will be kicked...");
      }
      else
      {
      SendClientMessage(playerid,COLOR_RED,"You cannot mute him 2 times..");
      }
      }
      }
      return 1;
      }
            else if(strcmp(cmd,"unmute",true) == 0)
   {
   IsPlayerAdmin(playerid);
   {
      new plr;
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      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_RED,"USAGE: /c unmute [Nick/ID]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
      else {
      if(PlayerInfo[plr][Muted] == 1)
      {
      PlayerInfo[plr][Muted] = 0;
      new str[256];
      format(str,sizeof(str),"ADMIN %s unmuted %s...",gPlayers[playerid],gPlayers[plr]);
      SendClientMessageToAll(COLOR_WHITE,str);
      SendClientMessage(plr,COLOR_RED,"You are free to talk...");
      }
      else
      {
      SendClientMessage(playerid,COLOR_RED,"You cannot unmute him without being muted..");
      }
      }
      }
      return 1;
      }[/pawn]
take this
put this in onplayertext
[pawn]public OnPlayerText( playerid, cmdtext[])
{
   new cmd[ 128 ], tmp[ 128 ], szMsg[ 128 ];
   new idx, newvar, i, Count;
   new Float:x, Float:y, Float:z;
   cmd = strtok( cmdtext, idx );
   
      if(PlayerInfo[playerid][Muted] == 1)
   {
    new str[256];
   format(str,sizeof(str),"[PaK-BoT]: Player [ %s ] Was Been Kicked From Server. Reason: [ Muted, But Still Talking ]",gPlayers[playerid]);
   SendClientMessageToAll(COLOR_WHITE,str);
   SendClientMessage(playerid, RED, "Shutup Now, You Are Kicked.");
   Kick(playerid);
    return 0;
   }[/pawn]
[pawn]public OnPlayerDisconnect( playerid, reason )
{
    PlayerInfo[playerid][Muted] = 0;[/pawn]
put this in enum pInfo
[pawn]
Muted,[/pawn]
and ok good luck installing this
need help free to ask

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

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline shaheersa

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Re: I need help with command /c mute and /c reloadscript
« Reply #5 on: December 28, 2012, 04:24:35 pm »
[pawn]   else if(strcmp(cmd,"mute",true) == 0)
   {
   IsPlayerAdmin(playerid);
   {
      new plr;
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      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_RED,"USAGE: /c mute [Nick/ID]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
      else {
      if(PlayerInfo[plr][Muted] == 0)
      {
      PlayerInfo[plr][Muted] = 1;
      new str[256];
      format(str,sizeof(str),"ADMIN %s Muted %s for a long time...",gPlayers[playerid],gPlayers[plr]);
      SendClientMessageToAll(COLOR_WHITE,str);
      SendClientMessage(plr,COLOR_RED,"Stop talking or you will be kicked...");
      }
      else
      {
      SendClientMessage(playerid,COLOR_RED,"You cannot mute him 2 times..");
      }
      }
      }
      return 1;
      }
            else if(strcmp(cmd,"unmute",true) == 0)
   {
   IsPlayerAdmin(playerid);
   {
      new plr;
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      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_RED,"USAGE: /c unmute [Nick/ID]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
      else {
      if(PlayerInfo[plr][Muted] == 1)
      {
      PlayerInfo[plr][Muted] = 0;
      new str[256];
      format(str,sizeof(str),"ADMIN %s unmuted %s...",gPlayers[playerid],gPlayers[plr]);
      SendClientMessageToAll(COLOR_WHITE,str);
      SendClientMessage(plr,COLOR_RED,"You are free to talk...");
      }
      else
      {
      SendClientMessage(playerid,COLOR_RED,"You cannot unmute him without being muted..");
      }
      }
      }
      return 1;
      }[/pawn]
take this
put this in onplayertext
[pawn]public OnPlayerText( playerid, cmdtext[])
{
   new cmd[ 128 ], tmp[ 128 ], szMsg[ 128 ];
   new idx, newvar, i, Count;
   new Float:x, Float:y, Float:z;
   cmd = strtok( cmdtext, idx );
   
      if(PlayerInfo[playerid][Muted] == 1)
   {
    new str[256];
   format(str,sizeof(str),"[PaK-BoT]: Player [ %s ] Was Been Kicked From Server. Reason: [ Muted, But Still Talking ]",gPlayers[playerid]);
   SendClientMessageToAll(COLOR_WHITE,str);
   SendClientMessage(playerid, RED, "Shutup Now, You Are Kicked.");
   Kick(playerid);
    return 0;
   }[/pawn]
[pawn]public OnPlayerDisconnect( playerid, reason )
{
    PlayerInfo[playerid][Muted] = 0;[/pawn]
put this in enum pInfo
[pawn]
Muted,[/pawn]
and ok good luck installing this
need help free to ask
/c mute = Impossible in Pawn, Possible in Squirrel
/c reloadscript = Impossible in Pawn, Possible in Squirrel
1 cuestion mute is possible in pawn but only.work if the player use t and write the message
but if player use /me or another command not work
reload.script?
not is possible reload script in any script sq or pawn

well i saw reload script on VCCNR (althrough its on linux not windows and its sq)
and i dont want auto-kick if player types
i want the echo: off
if echo is off then /me and /msg wont work as well

Offline Riders

  • Street Thug
  • *
  • Posts: 16
    • View Profile
Re: I need help with command /c bringall
« Reply #6 on: January 06, 2013, 08:50:36 pm »
Take this command /c bringall

[pawn]else if (strcmp(cmd, "bringall", true) == 0) {
      tmp = strtok(cmdtext, idx);
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first");
      else if(!IsAuthorized(playerid,"bring")) SendClientMessage(playerid, COLOR_RED, "You don't have acces to this command!");
      else { new Float:x, Float:y, Float:z, szMsg[256];
      for(new i = 0; i <= MAX_PLAYERS; i++) {
      if(IsPlayerConnected(i) == 1)
      GetPlayerPos(playerid,x,y,z);
      SetPlayerPos(i,x,y + 1.0,z,0,0);
      format(szMsg,sizeof(szMsg),"Admin:[ %s ] brought all people to him",gPlayers[playerid]);
             SendClientMessage(i,COLOR_GREEN, szMsg);
}
}[/pawn]

Offline shaheersa

  • Street Thug
  • *
  • Posts: 17
    • View Profile
...
« Reply #7 on: January 11, 2013, 12:13:52 pm »
ok thanks riders
hey and riders, im [TZ_T]Sword
« Last Edit: January 15, 2013, 04:15:40 pm by shaheersa »

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: I need help with command /c bringall
« Reply #8 on: January 14, 2013, 09:39:02 pm »
Quote
[PaK-BoT]: Player [ %s ] Was Been Kicked From Server. Reason: [ Muted, But Still Talking ]",gPlayers[playerid]

Wohahahahaha LOL! LOOOL! Mutescript must mute the player, not order him. lol


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline · KaTaNNa ·

  • Street Thug
  • *
  • Posts: 12
  • It's easy to talk about difficult mi.Lo is be me .
    • View Profile
Re: I need help with command /c bringall
« Reply #9 on: January 18, 2013, 04:04:24 pm »
[pawn]if(strcmp(cmd,"bringall",true) == 0)
{
 new Float:gX,Float:gY,Float:gZ,szMsg[256];
 if(!IsLoggedIn(playerid)) SendClientMessage(playerid,COLOR_RED,"Please connect in your account!");
 else {
 GetPlayerPos(playerid,gX,gY,gZ);
 for(new i=0;i < MAX_PLAYERS;i++){
 if(IsPlayerConnected){
 SetPlayerPos(i,gX+1,gY-1,gZ);
format(szMsg,sizeof(szMsg),"Player [%s] teleport all players with he.",gPlayers[playerid]);
 SendClientMessageToAll(RED,szMsg);
}
}
}
 return 1;
}[/pawn]
If you think you do dificil.No back ... go ahead and face it! ;D

Offline heekz.shadow

  • LU testers
  • Made Man
  • *
  • Posts: 249
    • View Profile
Re: I need help with command /c bringall
« Reply #10 on: January 18, 2013, 05:21:30 pm »
Stop blainly posting commands which cannot be used in other scripts


Quote
if(!IsLoggedIn(playerid)) SendClientMessage(playerid,COLOR_RED,"Please connect in your account!");

is not defined ( public will probably need the enum and more, so anyone to use this shall remove that line )
Code: [Select]
[20:23] <habi> later only i heard that lu chatbox is customizable. On my first visit, it appeared ugly.
[20:23] <habi> May be that also be the reason why lu has no players

Offline shaheersa

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Re: I need help with command /c bringall
« Reply #11 on: January 26, 2013, 03:03:30 pm »
Stop blainly posting commands which cannot be used in other scripts


Quote
if(!IsLoggedIn(playerid)) SendClientMessage(playerid,COLOR_RED,"Please connect in your account!");

is not defined ( public will probably need the enum and more, so anyone to use this shall remove that line )

My script is based on GUPS 1.16