SA-MP Forums Archive
[FilterScript] Simple /accent release! - 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] Simple /accent release! (/showthread.php?tid=223212)

Pages: 1 2


Simple /accent release! - maramizo - 09.02.2011

My first release to the community .

Anyway, the only /accent FS here were either Dialog or in the following way : [Playername]:[Accent][Text]

Which causes bugs as when the game asks you if you're Male or Female and you have to type the answer, which would be like :
Player_Name:[Unknown Accent] Male -- Causing answer not to be accepted and losing new players.

And the dialog had only limited accents, and you have to access the .PWN to add another accent which is, rather well, boring and not every accent that each player wanted could be made as fast and as easy.

Version 2 needs ZCMD and SSCANF2 Includes!

So, my /accent is rather both, here's the difference :

1. Text is the following way :
[Accent][PlayerName]:Text -- Removing previous chat bugs.

2. Unlimited Possibilities, just type in /accent [accenthere] and voila!

PasteBin link -old- : http://pastebin.com/XYZQ9bEL
V2 http://pastebin.com/wRELJvaX


Picture :


Ignore the 'unknown command', it's just because I just added this command to the filterscript and in the server it's not yet defined as a command.


Re: Simple /accent release! - TheYoungCapone - 09.02.2011

pretty cool


Re: Simple /accent release! - maramizo - 09.02.2011

Glad I could offer something in my first day of registration!


Re: Simple /accent release! - 1337connor - 09.02.2011

Nice


Re: Simple /accent release! - bloodrocklee - 09.02.2011

nice , not bad


Re: Simple /accent release! - Krx17 - 09.02.2011

Some constructive criticism.

Get rid of strtok. It's very inefficient and slow. No need for any command processor ether as you could just use cmdtext itself.
You don't need to see if a player is connected inside the command.
Why do you declare pAccent when you do not use it?

pawn Код:
if(strcmp(cmdtext, "/accent", true) == 0)
{
    if(strlen(cmdtext) < 9)
        return SendClientMessage(playerid, 0xFFFF00AA, "Syntax: /accent [accent]");
    new string[60];
    SetPVarString(playerid, "Accent", cmdtext[8]);
    format(string, 60, "You have set your accent to %s.", cmdtext[8]);
    SendClientMessage(playerid, 0x00FF00AA, string);
    return 1;
}



Re: Simple /accent release! - On_Top_Non_Stop - 09.02.2011

/Accent ThisIsAVeryLongAccent!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!

Forum added spaces to it but you get the idea..

You should limit the accent to at least 20 characters.


Re: Simple /accent release! - maramizo - 09.02.2011

Quote:
Originally Posted by Krx17
Посмотреть сообщение
Some constructive criticism.

Get rid of strtok. It's very inefficient and slow. No need for any command processor ether as you could just use cmdtext itself.
You don't need to see if a player is connected inside the command.
Why do you declare pAccent when you do not use it?

pawn Код:
if(strcmp(cmdtext, "/accent", true) == 0)
{
    if(strlen(cmdtext) < 9)
        return SendClientMessage(playerid, 0xFFFF00AA, "Syntax: /accent [accent]");
    new string[60];
    SetPVarString(playerid, "Accent", cmdtext[8]);
    format(string, 60, "You have set your accent to %s.", cmdtext[8]);
    SendClientMessage(playerid, 0x00FF00AA, string);
    return 1;
}
Nothing more I can say than thank you!
I really appreciate anyone criticizing me coz I'm still new and need every tip I get!
Thanks alot
And I'm glad everyone likes it and I will be editing it to make a lower and upper bound.


Re: Simple /accent release! - maramizo - 09.02.2011

Quote:
Originally Posted by On_Top_Non_Stop
Посмотреть сообщение
/Accent ThisIsAVeryLongAccent!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!

Forum added spaces to it but you get the idea..

You should limit the accent to at least 20 characters.
Fixed that too, new version is released.
With lower bounds of 9 and upper bounds of 20


Re: Simple /accent release! - maramizo - 19.02.2011

V2 Link Fixed, just noticed it was dead -.-


Re : Simple /accent release! - [WTF]Godfather - 19.02.2011

Euuh.........What's the point of this FS?? coz i think it's not usefull


Re: Re : Simple /accent release! - Master_Gangster - 19.02.2011

Quote:
Originally Posted by [WTF]Godfather
Посмотреть сообщение
Euuh.........What's the point of this FS?? coz i think it's not usefull
it is useful for beginners...plus it's his first FS give him a break >.>


Re: Simple /accent release! - justsomeguy - 19.02.2011

hmm i have seen this! before your ure you made this cuz we had another copiecat today:P

edit:
here i saw it but yours is different i guess:P click me now!!!!!!


Re: Simple /accent release! - Master_Gangster - 19.02.2011

EDIT: for some reason this blocks out all of my commands...every time I do a command it says " you have changed your accent to ." any ideas?


Re: Simple /accent release! - maramizo - 21.02.2011

Quote:
Originally Posted by Master_Gangster
Посмотреть сообщение
EDIT: for some reason this blocks out all of my commands...every time I do a command it says " you have changed your accent to ." any ideas?
Edited V2, you need ZCMD and SSCANF2.


Re: Simple /accent release! - Master_Gangster - 21.02.2011

Quote:
Originally Posted by maramizo
Посмотреть сообщение
Edited V2, you need ZCMD and SSCANF2.
how would I make this save when a player logs out then logs back in?


Re: Simple /accent release! - maramizo - 21.02.2011

Quote:
Originally Posted by Master_Gangster
Посмотреть сообщение
how would I make this save when a player logs out then logs back in?
Dini. You can add it up to your gamemode if you know how to script.
Plus this is just accent lol, takes 5 minutes to make it.


Re: Simple /accent release! - maramizo - 22.02.2011

Quote:
Originally Posted by Master_Gangster
Посмотреть сообщение
how would I make this save when a player logs out then logs back in?
So now it works?


Re: Simple /accent release! - Master_Gangster - 22.02.2011

Quote:
Originally Posted by maramizo
Посмотреть сообщение
So now it works?
I'm actually starting to script again. sorry but I haven't figured out how to do it yet.


Re: Simple /accent release! - maramizo - 22.02.2011

Does anyone have an suggestions on any filterscripts to do next?