SA-MP Forums Archive
[FilterScript] aMe and aDo - For RP Server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] aMe and aDo - For RP Server (/showthread.php?tid=373075)



aMe and aDo - For RP Server - IceMeteor - 29.08.2012

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;
}



Re: aMe and aDo - For RP Server - NinjaChicken - 29.08.2012

first!

OT: nice bro rep +


Re: aMe and aDo - For RP Server - Guitar - 29.08.2012

Great, thank you


Re: aMe and aDo - For RP Server - IceMeteor - 29.08.2012

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

OT: nice bro rep +
Thanks

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


Re: aMe and aDo - For RP Server - rahmatjulian - 29.08.2012

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



Re: aMe and aDo - For RP Server - Scott Zulkifli - 29.08.2012

aciat ciat...

Not Bad...


Re: aMe and aDo - For RP Server - FaldiGunZ - 31.08.2012

Nice Job Baby !


Re: aMe and aDo - For RP Server - DwayneVanKom - 31.08.2012

Yeah.. Ravian..


Re: aMe and aDo - For RP Server - Yaki - 31.08.2012

Not bad son


Re: aMe and aDo - For RP Server - DwayneVanKom - 02.09.2012

Rahmat Julian Silalahi Von Maho wakawkak


Re: aMe and aDo - For RP Server - dafuq - 02.09.2012

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


Re: aMe and aDo - For RP Server - FaldiGunZ - 09.09.2012

Yeah Nobel Van Gay haha


Re: aMe and aDo - For RP Server - NoahF - 09.09.2012

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


Re: aMe and aDo - For RP Server - FaldiGunZ - 09.09.2012

This is RC Race Map , this is for RC Car Racing


Re: aMe and aDo - For RP Server - Mr.Ramadhann - 15.10.2012

Oh Great!
I Will Added This to My Server ..


Re: aMe and aDo - For RP Server - TyX - 15.10.2012

nice job man!


Re: aMe and aDo - For RP Server - ProPoint - 15.01.2013

Awesome IceMeteor !
Rep + !

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


Re: aMe and aDo - For RP Server - Slix_ - 15.01.2013

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.