Author Topic: [ADD-ON] CreatePickupEx, SendMessageToStalkerAdmins  (Read 2224 times)

0 Members and 1 Guest are viewing this topic.

Offline Matz

  • Big Fish
  • ****
  • Posts: 301
  • Awards Overall winner of Littlewhitey's Weeks in 2011
    • Awards
[ADD-ON] CreatePickupEx, SendMessageToStalkerAdmins
« on: July 10, 2012, 03:47:05 pm »
Hi. I seeing so empty this section. I wanted to share tiny somehings for it.

1. CreatePickupEx
Code: [Select]
stock CreatePickupEx(model, type, Float:X, Float:Y, Float:Z, Virtualworld, Virtualworld2, txt[])
{
    CreatePickup(model, type, X, Y, Z, Virtualworld);
    Create3DTextLabel(txt, -1, X, Y, Z+0.85, 25.0, Virtualworld2);
    return 1;
}

An example for usage:

Code: [Select]
CreatePickupEx(1239, 1, 290.2993, -84.1711, 1011.5154, 0, 0, "Ammunation!");

2. SendMessageToStalkerAdmins
This is for custom admin systems (not rcon)

new IsPlayerStalker[MAX_PLAYERS]; // they can disable it.

Code: [Select]
stock SendMessageToStalkerAdmins(color,const msg[]) // pAdmin is custom value, you can change it with yours.
{
   for (new i=0; i<MAX_PLAYERS; i++)
   {
      if (IsPlayerConnected(i) && (PlayerInfo[i][pAdmin] >= 1) && (IsPlayerStalker[i] == 1)) SendClientMessage(i,color,msg);
   }
}

An example for usage:

Code: [Select]
format(str,sizeof(str),"%d %s %s"playerid,id,txt); SendMessageToAdmins(-1,str); // a part of a format

Thats all : P

Offline PawnFox

  • Developer
  • Management
  • *
  • Posts: 1919
  • Awards Littlewhitey's SA-MP Player of the Year 2013
    • Awards
Re: [ADD-ON] CreatePickupEx, SendMessageToStalkerAdmins
« Reply #1 on: July 22, 2012, 04:46:51 pm »
Nice ADD-ONs  ;D