Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: (RD)BlackZoom on May 03, 2014, 09:47:10 pm

Title: i need commands pawno...
Post by: (RD)BlackZoom on May 03, 2014, 09:47:10 pm
please i need script pawno /c mute, /c unban
Title: Re: i need commands pawno...
Post by: mrockxkingbutt on May 04, 2014, 10:40:56 am
Dude !!! Its For SQ
Title: Re: i need commands pawno...
Post by:    hind on May 04, 2014, 03:48:34 pm
[pawn]if (strcmp(cmd, "mute", true) == 0) {
          if (IsPlayerAdmin(playerid)) {
         tmp = strtok(cmdtext, idx);
         newvar = FindPlayerIDFromString(tmp);
         if (!strlen(tmp)) {
            SendClientMessage(playerid, COLOR_GREEN, "USAGE: /c jail <name/id>");
         } else {
            new string[256];
            format(string, 256, "Admin [ %s ] has jailed [ %s ]!", gPlayers[ playerid ], gPlayers[ newvar ]);
            SendClientMessageToAll(COLOR_YELLOW, string);
            TogglePlayerControllable(newvar, 0);
         }
         } else {
            SendClientMessage(playerid, RED, " You have not access to use the command!");
         }
      return 1;[/pawn]
Title: Re: i need commands pawno...
Post by: Rocky 26722 on May 04, 2014, 03:54:24 pm
[pawn]if (strcmp(cmd, "mute", true) == 0) {
          if (IsPlayerAdmin(playerid)) {
         tmp = strtok(cmdtext, idx);
         newvar = FindPlayerIDFromString(tmp);
         if (!strlen(tmp)) {
            SendClientMessage(playerid, COLOR_GREEN, "USAGE: /c jail <name/id>");
         } else {
            new string[256];
            format(string, 256, "Admin [ %s ] has jailed [ %s ]!", gPlayers[ playerid ], gPlayers[ newvar ]);
            SendClientMessageToAll(COLOR_YELLOW, string);
            TogglePlayerControllable(newvar, 0);
         }
         } else {
            SendClientMessage(playerid, RED, " You have not access to use the command!");
         }
      return 1;[/pawn]

Man This Is Jail Cmds
Title: Re: i need commands pawno...
Post by: dynavolt71 on May 05, 2014, 01:57:33 am
He just change /c jail to /c mute
Title: Re: i need commands pawno...
Post by: Erik on May 05, 2014, 03:03:21 pm
OnPlayerCommandText

Code: [Select]
else if(strcmp(cmd,"mute",true) == 0)
{
 
new plr;
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "-> Please login!." );
      {
        if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"");
  else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
        else if ( !IsAuthorized( playerid, "mute" ) ) SendClientMessage( playerid, COLOR_RED, "-> Not have access to the command! :P!" );
        else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c mute [Nick/ID]" );
else {
if(PlayerInfo[plr][Muted] == 0)
{
PlayerInfo[plr][Muted] = 1;
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;
}


OnPlayerText

   
Code: [Select]
if(PlayerInfo[playerid][Muted] == 1)
{
    new str[256];
format(str,sizeof(str),"Auto-Kick Player:[ %s ] Reason:[ Mute Evader ]",gPlayers[playerid]);
SendClientMessageToAll(COLOR_Yellow,str);
Kick(playerid);
  return 0;
}

On TOP!

Code: [Select]
enum pInfo
{
Password[ MAX_PASS_SIZE +1 ],
Logged,
Level,
Skinid,
Stats,
Muted

Title: Re: i need commands pawno...
Post by: NeskWriter on May 05, 2014, 03:06:22 pm
Hahah fucking idiots made my day
Title: Re: i need commands pawno...
Post by: NE.Restricted on May 05, 2014, 03:30:56 pm
OnPlayerCommandText

Code: [Select]
else if(strcmp(cmd,"mute",true) == 0)
{
 
new plr;
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "-> Please login!." );
      {
        if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"");
  else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
        else if ( !IsAuthorized( playerid, "mute" ) ) SendClientMessage( playerid, COLOR_RED, "-> Not have access to the command! :P!" );
        else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c mute [Nick/ID]" );
else {
if(PlayerInfo[plr][Muted] == 0)
{
PlayerInfo[plr][Muted] = 1;
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;
}


OnPlayerText

   
Code: [Select]
if(PlayerInfo[playerid][Muted] == 1)
{
    new str[256];
format(str,sizeof(str),"Auto-Kick Player:[ %s ] Reason:[ Mute Evader ]",gPlayers[playerid]);
SendClientMessageToAll(COLOR_Yellow,str);
Kick(playerid);
  return 0;
}

On TOP!

Code: [Select]
enum pInfo
{
Password[ MAX_PASS_SIZE +1 ],
Logged,
Level,
Skinid,
Stats,
Muted
LOL!