PDA

View Full Version : Sethat system by Neo


Soala
09-19-2008, 06:28 PM
Okay so Neo (Deas_Voice) was too busy to post it
Here we go, credits goes to him.
//#CLIENTSIDE
function onPlayerChats() {
tokens = player.chat.tokenize();
// use sethat image to set ur hat
if (tokens[0] == "sethat") {
player.attr[1] = tokens[1];
player.client.ishat = tokens[1];
}
}

Deas_Voice
09-19-2008, 06:30 PM
.....................
WHY !! WHY!! :'(

i could posted this myself..

Tigairius
09-19-2008, 06:31 PM
Okay so Neo (Deas_Voice) was too busy to post it
Here we go, credits goes to him.
//#CLIENTSIDE
function onPlayerChats() {
tokens = player.chat.tokenize();
// use sethat image to set ur hat
if (tokens[0] == "sethat") {
player.attr[1] = tokens[1];
player.client.ishat = tokens[1];
}
}


Could also do this:


//#CLIENTSIDE
function onPlayerChats() {
if (player.chat.starts("sethat")) {
player.attr[1] = client.ishat = player.chat.tokenize()[1];
}
}


but nice :)

Soala
09-19-2008, 06:33 PM
.....................
WHY !! WHY!! :'(

i could posted this myself..

You were too lazy :o
Too late lol.

P.S: REP GOES FOR NEO

Deas_Voice
09-19-2008, 06:34 PM
Could also do this:


//#CLIENTSIDE
function onPlayerChats() {
if (player.chat.starts("sethat")) {
player.attr[1] = client.ishat = player.chat.tokenize()[1];
}
}


but nice :)

ty x_x... soala u could just have waited 5 min so i could post it myself >(

Tigairius
09-19-2008, 06:35 PM
ty x_x... soala u could just have waited 5 min so i could post it myself >(

Don't get mad over it, the script was pretty basic. At least it wasn't a big complex system :)

Deas_Voice
09-19-2008, 06:41 PM
Don't get mad over it, the script was pretty basic. At least it wasn't a big complex system :)

well im kinda mad on him cus he was like "u should post this in the GG, it would be great for new server", and i said yeah sure, just a min...
then he goes and post it :\

DrakilorP2P
09-19-2008, 08:00 PM
well im kinda mad on him cus he was like "u should post this in the GG, it would be great for new server", and i said yeah sure, just a min...
then he goes and post it :\

I fail to understand why anyone would care who the poster is.

Kristi
09-19-2008, 08:37 PM
Could also do this:

Or this:


//#CLIENTSIDE
function onPlayerChats() {
// space to weed out a ridiculous word (?sethatman)
if (player.chat.starts("sethat ")) {
// no searching compared to token
player.attr[1] = client.ishat = player.chat.substring(7);
}
}

Soala
09-19-2008, 08:38 PM
I fail to understand why anyone would care who the poster is.

Especially when I give the credits O_O

Deas_Voice
09-19-2008, 10:05 PM
I fail to understand why anyone would care who the poster is.

he talkt me into it :whatever:

DrakilorP2P
09-20-2008, 12:29 AM
he talkt me into it :whatever:

He posted the script and then talked you into getting upset over it?

maximus_asinus
09-20-2008, 03:17 AM
so I could put pics1.png as my hat?

Deas_Voice
09-20-2008, 04:18 PM
so I could put pics1.png as my hat?

no stupid -_-

Crow
09-20-2008, 04:27 PM
no stupid -_-

Yes, he basically could. You could check if the name of the image includes "hat" though.

//#CLIENTSIDE
function onPlayerChats() {
if (!player.chat.starts("sethat "))
return;

if (player.chat.trim().substring(6).pos("hat") == -1)
return;

player.attr[1] = client.ishat = player.chat.trim().substring(6);
}

Deas_Voice
09-20-2008, 04:29 PM
oh comon .. give me a break!
you can do it in alot of ways!
no need to state them all??????

Crow
09-20-2008, 04:36 PM
oh comon .. give me a break!
you can do it in alot of ways!
no need to state them all??????

I just added something to check if "hat" is somewhere in the file name stated by the player. The other stuff is basically preference.

DrakilorP2P
09-20-2008, 05:21 PM
mud_whatsit.png

Soala
09-20-2008, 05:23 PM
mud_whatsit.png

orly?

DarkReaper0
09-20-2008, 08:09 PM
so I could put pics1.png as my hat?


Yes you could, in fact I run around like that all the time on free-hat servers xD