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

0 Members and 2 Guests are viewing this topic.

Offline Matz

  • Big Fish
  • ****
  • Posts: 302
    • 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

  • SA-MP
  • SA-MP Retirees
  • *
  • Posts: 1998
  • 187 Co.
    • Awards
Re: [ADD-ON] CreatePickupEx, SendMessageToStalkerAdmins
« Reply #1 on: July 22, 2012, 04:46:51 PM »
Nice ADD-ONs  ;D