[FilterScript] aMe and aDo - For RP Server
#1

aMe and aDo - For RP Server v1.0
by Ravian - IceMeteor
Intro
My Second Filterscript, I got inspired from some of my friend that want this command. This command allow you to place /me and /do command, but as a 3D Text Label. The /ame is to describe about the character appearance, like what the character use. The 3DText will appear below our nametag. The /ado is to describe about the situation of the place, or to make a Sticker/Board in a place.

Videos and Screenshot


Commands
/ame - to create/update an aMe
/ame off - to delete an aMe
/ado - to create/update an aDo
/ado off - to delete an aDo

Needs
- ZCMD >> https://sampforum.blast.hk/showthread.php?tid=91354
- sscanf2 >> https://sampforum.blast.hk/showthread.php?tid=120356
- streamer >> https://sampforum.blast.hk/showthread.php?tid=102865

Install
  1. Open your pawno, hit New button
  2. Replace all text there with the code below
  3. Save it at the filterscripts folder as 'ameado.pwn'
  4. Compile it
  5. Open your server.cfg, add 'ameado' at the filterscript section
  6. Save the server.cfg, start the samp-server.exe
Notes
Make sure that you already place sscanf and streamer plugin.
And make sure that there's something printed on your console after loading the filterscipt
Код:
[19:36:59]   Loading filterscript 'ameado.amx'...
[19:36:59] ----------------------------------------------
[19:36:59]  AME and ADO Filterscript by IceMeteor - Ravian
[19:36:59] ----------------------------------------------
Bugs
I haven't found any bugs yet, report here if you found one

Credits
All people that support this, direct or indirectly

Download
Pastebin
OR
pawn Код:
#include <a_samp>
#include <sscanf2>
#include <zcmd>
#include <streamer>

#define COLOR_ME 0xC2A2DAFF
#define COLOR_ERROR 0xFF0000FF

new Text3D:ame[MAX_PLAYERS];
new Text3D:ado[MAX_PLAYERS];
new amestatus[MAX_PLAYERS], adostatus[MAX_PLAYERS];

public OnFilterScriptInit()
{
    print("\n-----------------------------------------------");
    print(" AME and ADO Filterscript by IceMeteor - Ravian ");
    print("-----------------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    DestroyDynamic3DTextLabel(ado[playerid]);
    DestroyDynamic3DTextLabel(ame[playerid]);
    amestatus[playerid] = 0;
    adostatus[playerid] = 0;
    return 1;
}

GetRPName(playerid)
{
    new RPName[MAX_PLAYER_NAME], i_pos;
    GetPlayerName(playerid, RPName, MAX_PLAYER_NAME);
    while ((i_pos = strfind(RPName, "_", false, i_pos)) != -1) RPName[i_pos] = ' ';
    return RPName;
}

CMD:ame(playerid, params[])
{
    new result[100], string[140];
    if(sscanf(params, "s[100]", result))
    {
        SendClientMessage(playerid, COLOR_ERROR, "USAGE:{FFFFFF} /ame [description] - This text will show up above your head.");
        SendClientMessage(playerid, COLOR_ERROR, "HINT:{FFFFFF} Use (/ame off) to remove the text!");
        return 1;
    }
    if(strlen(result) >100) return SendClientMessage(playerid, COLOR_ERROR, "The description shouldn't more than 100 character!");
    if(strcmp(result, "off", true) == 0)
    {
        if(amestatus[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You don't have any ame attached!");
        DestroyDynamic3DTextLabel(ame[playerid]);
        SendClientMessage(playerid, COLOR_ME, "AME deleted!");
        amestatus[playerid] = 0;
        return 1;
    }
    if(amestatus[playerid] == 0)
    {
        format(string, sizeof(string), "* %s %s *", GetRPName(playerid), result);
        ame[playerid] = CreateDynamic3DTextLabel(string, COLOR_ME, 0.0, 0.0, 0.0, 40.0, playerid);
        format(string, sizeof(string), "AME >> %s", string);
        SendClientMessage(playerid, COLOR_ME, "You have attached an AME above your head!");
        SendClientMessage(playerid, COLOR_ME, string);
        amestatus[playerid] = 1;
    }
    else
    {
        format(string, sizeof(string), "* %s %s *", GetRPName(playerid), result);
        UpdateDynamic3DTextLabelText(ame[playerid], COLOR_ME, string);
        format(string, sizeof(string), "AME Update Success! >> %s", string);
        SendClientMessage(playerid, COLOR_ME, string);
        return 1;
    }
    return 1;
}

CMD:ado(playerid, params[])
{
    new result[100], string[140];
    if(sscanf(params, "s[200]", result))
    {
        SendClientMessage(playerid, COLOR_ERROR, "USAGE:{FFFFFF} /ado [description] - This text will stay on your current place.");
        SendClientMessage(playerid, COLOR_ERROR, "HINT:{FFFFFF} Use (/ado off) to remove the text!");
        return 1;
    }
    if(strlen(result) >100) return SendClientMessage(playerid, COLOR_ERROR, "The description shouldn't more than 100 character!");
    if(strcmp(result, "off", true) == 0)
    {
        if(adostatus[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You don't have any ado attached!");
        DestroyDynamic3DTextLabel(ado[playerid]);
        SendClientMessage(playerid, COLOR_ME, "ADO deleted!");
        adostatus[playerid] = 0;
        return 1;
    }
    if(adostatus[playerid] == 0)
    {
        new Float:AdoX, Float:AdoY, Float:AdoZ;
        GetPlayerPos(playerid, AdoX, AdoY, AdoZ);
        format(string, sizeof(string), "* %s *\n(( %s ))", result, GetRPName(playerid));
        ado[playerid] = CreateDynamic3DTextLabel(string, COLOR_ME, AdoX, AdoY, AdoZ, 40.0);
        SendClientMessage(playerid, COLOR_ME, "You have attached an ADO at your current place!");
        adostatus[playerid] = 1;
    }
    else
    {
        format(string, sizeof(string), "* %s *\n(( %s ))", result, GetRPName(playerid));
        UpdateDynamic3DTextLabelText(ado[playerid], COLOR_ME, string);
        SendClientMessage(playerid, COLOR_ME, "ADO Update Success!");
        return 1;
    }
    return 1;
}
Reply
#2

first!

OT: nice bro rep +
Reply
#3

Great, thank you
Reply
#4

Quote:
Originally Posted by NinjaChicken
Посмотреть сообщение
first!

OT: nice bro rep +
Thanks

Quote:
Originally Posted by Guitar
Посмотреть сообщение
Great, thank you
Your welcome
Reply
#5

Aciat ciat ....
Nice Job Ravian !!!!!
.................................................. ....................................
Waiting For The Another Release !!!!!!
.................................................. ....................................
Reply
#6

aciat ciat...

Not Bad...
Reply
#7

Nice Job Baby !
Reply
#8

Yeah.. Ravian..
Reply
#9

Not bad son
Reply
#10

Rahmat Julian Silalahi Von Maho wakawkak
Reply
#11

Nice for you, but I don't actually like this.
Reply
#12

Yeah Nobel Van Gay haha
Reply
#13

Cool script. Haven't seen anything like this so far so keep up the good work! BTW, what's your map mod called? Lol.
Reply
#14

This is RC Race Map , this is for RC Car Racing
Reply
#15

Oh Great!
I Will Added This to My Server ..
Reply
#16

nice job man!
Reply
#17

Awesome IceMeteor !
Rep + !

PS. Can you make the /ame show up for just 3 second maybe ?
Reply
#18

This is only creating more server advertising on different servers.

Quote:
Originally Posted by ProPoint
View Post
PS. Can you make the /ame show up for just 3 second maybe ?
But with this idea, it would be twenty times better than before.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)