Accent Filterscript
#1

im searching a filterscript so if i do /accent mexican

/s Hello Vagos

Playername [Mexican accent]: Hello Vagos

but i can't findt it :S
Reply
#2

Just use a simple tag system when the player is typing the /accent command
Reply
#3

Quote:
Originally Posted by Frank Biohazard
Посмотреть сообщение
im searching a filterscript so if i do /accent mexican

/s Hello Vagos

Playername [Mexican accent]: Hello Vagos

but i can't findt it :S
Ah i know what you mean. Heres the code:-

pawn Код:
COMMAND:mexican(playerid, params[])
{
    new string[164];
    if(sscanf(params, "s[128]", string))
    {
        SendClientMessage(playerid, -1, "ERROR: Usage /mexican [message]");
        return 1;
    }
    else
    {
        format(string, sizeof(string), "(Mexican Accent) %s: %s :)", GetPlayerName(playerid), string);
        SendClientMessageToAll(GetPlayerColor(playerid), string);
    }
    return 1;
}
Made it fast, I hope this helps you!

You can copy this as many times you want and make different accents If it gives you error please consider contacting me or just post them below.

-FalconX
Reply
#4

thanks
Reply
#5

This is mine.
//==========================================//

Command. You need to change the accent variable to what suites your server.
pawn Код:
CMD:accent(playerid,params[])
{
    new accent;
    if(sscanf(params,"i",accent))
    {
        SendClientMessage(playerid,COLOR_LIGHTGRAY,"USAGE: /accent [number]");
        SendClientMessage(playerid,COLOR_LIGHTGRAY,"1:[American] 2:[Mexican] 3:[Russian]");
        return 1;
    }
    if(accent > 3 || accent < 1)
    {
        SendClientMessage(playerid,COLOR_LIGHTGRAY,"Invalid number.");
        return 1;
    }
    else
    {
        pInfo[playerid][pAccent] = accent;
        if(accent == 1) return SendClientMessage(playerid,COLOR_WHITE,"You have switched to an American accent.");
        else if(accent == 2) return SendClientMessage(playerid,COLOR_WHITE,"You have switched to a Mexican accent.");
        else if(accent == 3) return SendClientMessage(playerid,COLOR_WHITE,"You have switched to a Russian accent.");
        return 1;
    }
}
OnPlayerText. (This is what does the Playername [Accent]: text)
pawn Код:
public OnPlayerText(playerid, text[])
{
    new pname[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    strreplace(pname,'_',' ');
    switch(pInfo[playerid][pAccent])
    {
        case 0:format(str, sizeof(str), "%s says: %s", pname, text);
        case 1:format(str, sizeof(str), "[American Accent] %s says: %s", pname, text);
        case 2:format(str, sizeof(str), "[Mexican Accent] %s says: %s", pname, text);
        case 3:format(str, sizeof(str), "[Russian Accent] %s says: %s", pname, text);
    }
    ProxDetector(30.0, playerid, str, COLOR_WHITE);
    return 0;
}
ProxDetector Function add this anywhere on the top of your script.
pawn Код:
stock ProxDetector(Float:radi, playerid, string[],color)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    for(new player;player<MAX_PLAYERS;player++)
    {
        if(!IsPlayerConnected(playerid))continue;
        if(IsPlayerInRangeOfPoint(player,radi,x,y,z)) SendClientMessage(player,color,string);
    }
}
Reply
#6

Quote:
Originally Posted by Frank Biohazard
Посмотреть сообщение
thanks
It's alright mate, I made a filterscript for you. You can put this in PAWNO and paste this and compile it will work.

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>
#include <sscanf2>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("Accents commands, made by FalconX loaded");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    print("\n--------------------------------------");
    print("Accents commands, made by FalconX unloaded");
    print("--------------------------------------\n");
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print("Accents commands, made by FalconX");
    print("----------------------------------\n");
}

#endif

COMMAND:mexican(playerid, params[])
{
    new string[164];
    if(sscanf(params, "s[128]", string))
    {
        SendClientMessage(playerid, -1, "ERROR: Usage /mexican [message]");
        return 1;
    }
    else
    {
        format(string, sizeof(string), "(Mexican Accent) %s: %s", GetName(playerid), string);
        SendClientMessageToAll(GetPlayerColor(playerid), string);
    }
    return 1;
}

// you can copy the above code as many times as you want and can make more accents.

stock GetName(playerid)
{
    new name[24];
    GetPlayerName(playerid, name, 24);
    return name;
}
I tested it.

-FalconX
Reply
#7

Quote:
Originally Posted by ue_falconx
Посмотреть сообщение
It's alright mate, I made a filterscript for you. You can put this in PAWNO and paste this and compile it will work.

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>
#include <sscanf2>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("Accents commands, made by FalconX loaded");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    print("\n--------------------------------------");
    print("Accents commands, made by FalconX unloaded");
    print("--------------------------------------\n");
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print("Accents commands, made by FalconX");
    print("----------------------------------\n");
}

#endif

COMMAND:mexican(playerid, params[])
{
    new string[164];
    if(sscanf(params, "s[128]", string))
    {
        SendClientMessage(playerid, -1, "ERROR: Usage /mexican [message]");
        return 1;
    }
    else
    {
        format(string, sizeof(string), "(Mexican Accent) %s: %s", GetName(playerid), string);
        SendClientMessageToAll(GetPlayerColor(playerid), string);
    }
    return 1;
}

// you can copy the above code as many times as you want and can make more accents.

stock GetName(playerid)
{
    new name[24];
    GetPlayerName(playerid, name, 24);
    return name;
}
I tested it.

-FalconX
This means they have to type /mexican to speak in that accent. Kinda lame :\ Look at mine. It works like it would a RP server.
Reply
#8

Quote:
Originally Posted by Walsh
Посмотреть сообщение
This means they have to type /mexican to speak in that accent. Kinda lame :\ Look at mine. It works like it would a RP server.
Ofcourse it does. I don't care what you made, I tried to help him. He must be more clear if he wanted such a system. And yes I don't really care

Quote:
Originally Posted by Frank Biohazard
Посмотреть сообщение
im searching a filterscript so if i do /accent mexican

/s Hello Vagos

Playername [Mexican accent]: Hello Vagos

but i can't findt it :S
@Walsh And open your eyes before posting a new reply lmfao! He said "/s Hello Vagos" then the playername Mexican Accent, he never meant the thing you made xD Well lol good that you made a script for helping him, no offence! :P

@Frank, I guess what I made helped you

-FalconX
Reply
#9

Quote:
Originally Posted by ue_falconx
Посмотреть сообщение
Ofcourse it does. I don't care what you made, I tried to help him. He must be more clear if he wanted such a system. And yes I don't really care

@Frank, I guess what I made helped you

-FalconX
Well, my bad dude. It's just that when I think of an accent system I think of a RP system. No hard feelings? (:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)