World Life RP Gaming
Would you like to react to this message? Create an account in a few clicks or log in to continue.

/Warn Command!

5 posters

Go down

/Warn Command! Empty /Warn Command!

Post by AndyF Sat Apr 11, 2009 10:36 am

Hey there Ryan... I know you don't have that much of time to add commands, so guess what? I helped you make /warn command, its working great,no bugs found, its very nice!! Here, put it before /kick command.

Code:

//--------------------------------------[Warn]----------------------------------------------------
 if(strcmp(cmd, "/warn", true) == 0)
 {
    if(IsPlayerConnected(playerid))
    {
      tmp = strtok(cmdtext, idx);
  if(!strlen(tmp))
  {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /warn [playerid/PartOfName] [reason]");
    return 1;
  }
  giveplayerid = ReturnUser(tmp);
  if (PlayerInfo[playerid][pAdmin] >= 1)
  {
      if(IsPlayerConnected(giveplayerid))
      {
          if(giveplayerid != INVALID_PLAYER_ID)
          {
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
      GetPlayerName(playerid, sendername, sizeof(sendername));
      new length = strlen(cmdtext);
      while ((idx < length) && (cmdtext[idx] <= ' '))
      {
      idx++;
      }
      new offset = idx;
      new result[64];
      while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
      {
      result[idx - offset] = cmdtext[idx];
      idx++;
      }
      result[idx - offset] = EOS;
      if(!strlen(result))
      {
      SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /warn [playerid/PartOfName] [reason]");
      return 1;
      }
      format(string, sizeof(string), "You warned %s, reason: %s", giveplayer, (result));
      SendClientMessage(playerid, COLOR_LIGHTRED, string);
      format(string, sizeof(string), "You were warned by %s, reason: %s", sendername, (result));
      SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
      format(string, sizeof(string), "AdmWarn: %s has been warned by %s, reason: %s", giveplayer, sendername, (result));
      ABroadCast(COLOR_YELLOW,string,1);
      return 1;
    }
    }//not connected
  }
  else
  {
    format(string, sizeof(string), "  %d is not an active player.", giveplayerid);
    SendClientMessage(playerid, COLOR_GRAD1, string);
  }
  }
  return 1;
 }

Just copy it and paste it before the /kick command.
AndyF
AndyF
Moderator
Moderator

Number of posts : 223
Age : 32
Location : New York,USA
In-Game Name : Andy_Fernandos
Points :
/Warn Command! Left_bar_bleue100 / 100100 / 100/Warn Command! Right_bar_bleue

Registration date : 2008-11-29

Back to top Go down

/Warn Command! Empty Re: /Warn Command!

Post by Exclikers Sat Apr 11, 2009 1:31 pm

Aight.. thanks. I'll do it
Exclikers
Exclikers
Ghettoz Mha Hommie
Server Owner
Ghettoz Mha HommieServer Owner

Number of posts : 193
Age : 33
Location : Cavite
In-Game Name : Ryan_Cooper
Points :
/Warn Command! Left_bar_bleue100 / 100100 / 100/Warn Command! Right_bar_bleue

Registration date : 2008-11-10

http://www.worldliferp.com

Back to top Go down

/Warn Command! Empty Re: /Warn Command!

Post by Warren Sat Apr 11, 2009 1:54 pm

Post this to Founder Section.
Warren
Warren
Experto
Experto

Number of posts : 361
Age : 32
Location : Philippines
In-Game Name : Warren_Orton
Points :
/Warn Command! Left_bar_bleue100 / 100100 / 100/Warn Command! Right_bar_bleue

Registration date : 2008-11-16

http://profiles.friendster.com/11395313

Back to top Go down

/Warn Command! Empty Re: /Warn Command!

Post by Insignia Sat Apr 11, 2009 3:00 pm

Would be a great help to some nub players around the server.
Insignia
Insignia
nOOb KiLLeR
nOOb KiLLeR

Number of posts : 183
Age : 35
Location : Philippines
In-Game Name : Mario_Conti
Points :
/Warn Command! Left_bar_bleue4 / 1004 / 100/Warn Command! Right_bar_bleue

Registration date : 2008-12-22

Back to top Go down

/Warn Command! Empty Re: /Warn Command!

Post by XhizorZ Sun Apr 12, 2009 12:00 am

/Locked Suggestion granted approval.
XhizorZ
XhizorZ
Be Amazed by my Logic!
Teh OwneR

Number of posts : 490
Age : 37
Location : Amsterdam
In-Game Name : Victor_Gonzales
Points :
/Warn Command! Left_bar_bleue100 / 100100 / 100/Warn Command! Right_bar_bleue

Registration date : 2008-11-24

Back to top Go down

/Warn Command! Empty Re: /Warn Command!

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum