[Tutorial] Chat Global With Symbol
#1

hallo

This time I will share a tutorial Chat Using Symbol

Screenshot


And it is a script
Include
pawn Code:
#include <a_samp>
#include <sscanf>
pawn Code:
public OnPlayerText(playerid, text[])
{
    new str[128], name[20];
    if(text[0] == '!')//edit the symbol "!" and input symbol do you like
    {
        GetPlayerName(playerid, name, sizeof(name));
        format(str, sizeof(str), "((%s: %s))", name, text[1]);
        SendClientMessageToAll(-1, str);
        return 0;
    }
    return 1;
}
Thanks
this is simple, hauhauaha
Reply
#2

Poorly Explained
Tutorial Is Not About Posting The Code
Tutorial Means To Explain Things As well
Reply
#3

If you want to write tutorial, you must be explain how the script work, function, etc.
EDIT: Oh, Im too late 2 second than GreTex
Reply
#4

Nice Work Kris!
Reply
#5

oh
I forgot how to use x_x
and this is how:
I am going to tell that how to use it
use the symbol! [text]
okay, there will appear a new global chat you type
Reply
#6

Quote:
Originally Posted by viveka27
View Post
Nice Work Kris!
thanks
Reply
#7

Quote:
Originally Posted by Krisna
View Post
oh
I forgot how to use x_x
and this is how:
I am going to tell that how to use it
use the symbol! [text]
okay, there will appear a new global chat you type
NOT THAT!
I mean, you must explain the function, etc.
Example you add // (comments) on your code.
like this
pawn Code:
CMD:hello(playerid, params[])
{
     SendClientMessageToAll(-1, "Hello"); //It will send all connected player with message "Hello", -1 means its white color.
     return 1;
}
Like that.
Reply
#8

lolwtf is this shit?
Reply
#9

Wew Script Sendiri Coyy Gile !! Krisna Nih Gw Moses
Reply
#10

pawn Code:
public OnPlayerText(playerid, text[])
{
new str[128], name[20];
if(text[0] == '!')
{
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "{800080}({FF8000}({FFFFFF}%s: %s{FF8000}){800080})", name, text[1]);
SendClientMessageToAll(-1, str);
return 0;
}
return 1;
}
What's str? what is sizeof?

What's the difference between %d and %s?

3/10 for trying though.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)