Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Xmair on Aug 29, 2015, 01:48 PM

Title: Gravity
Post by: Xmair on Aug 29, 2015, 01:48 PM
Hello, I wanna ask something, can we change only one world's gravity not the whole server? Transfer the player.Gravity to 0.4 -,-
Q2:
How can we use an ignore function on , onplayerchat function? Since the IsIgnored function isn't transferred to 0.4. It's my request to transfer it or tell / atleast give an example on how to do it?
Title: Re: Gravity
Post by: FinchDon on Aug 29, 2015, 01:57 PM
i think... impossible
Title: Re: Gravity
Post by: KAKAN on Aug 29, 2015, 02:00 PM
Quote from: FinchDon on Aug 29, 2015, 01:57 PMi think... impossible


What do u mean by saying it?
Title: Re: Gravity
Post by: Thijn on Aug 29, 2015, 02:34 PM
Quote from: KAKAN on Aug 29, 2015, 02:00 PM
Quote from: FinchDon on Aug 29, 2015, 01:57 PMi think... impossible


What do u mean by saying it?
Exactly what he says. The answer is no.
Title: Re: Gravity
Post by: Xmair on Aug 30, 2015, 11:42 AM
Another question added.
Title: Re: Gravity
Post by: FinchDon on Aug 30, 2015, 12:57 PM
return 0; i think it will be use for it
Title: Re: Gravity
Post by: KAKAN on Aug 30, 2015, 01:26 PM
Quote from: Xmair on Aug 29, 2015, 01:48 PMHow can we use an ignore function on , onplayerchat function? Since the IsIgnored function isn't transferred to 0.4. It's my request to transfer it or tell / atleast give an example on how to do it?

I too want to know it.
Title: Re: Gravity
Post by: Xmair on Aug 30, 2015, 01:33 PM
@FinchDon , If you return 0; for it, maybe the message won't go to the server -,- .
Title: Re: Gravity
Post by: KAKAN on Aug 30, 2015, 02:23 PM
return 0 can't be used for one player(I think)
It'll affect all the players in the server, just like mute
Title: Re: Gravity
Post by: Thijn on Aug 30, 2015, 03:26 PM
Just do a ClientMessage to each player with the chat line, and don't for people who have them ignore. Then return 0 to suppress the default message.
Something like this, you'll have to code the ignore logic yourself.

function onPlayerChat( player, message ) {
for( local i = 0; i < GetMaxPlayers(); i++ ) {
local plr = FindPlayer( i );
if ( plr && !isIgnore(player, plr) ) {
local teamColour = player.Colour;
local textCol = format("#%02X%02X%02X", teamColour.r, teamColour.g, teamColour.b);
ClientMessage( "[" + textCol + "]" + player.Name + ": [#FFFFFF]" + message, plr, 0, 0, 0 );
}
}
return 0;
}

function isIgnore( player, plr ) {
if ( player is ignored for plr ) {
return true;
} else {
return false;
}

}
Title: Re: Gravity
Post by: KAKAN on Aug 30, 2015, 05:50 PM
Oye Thanks, I'll work with it
Title: Re: Gravity
Post by: Xmair on Aug 31, 2015, 11:38 AM
Thanks @Thijn , I made it ::) I'll add more questions to this topic when I need to know.
Title: Re: Gravity
Post by: EK.IceFlake on Aug 31, 2015, 12:00 PM
@Thijn
*CTRL+ENTER*
[#something]*> [#ffffff]maxorator [#something]joined the server. *<
*CTRL+ENTER*
[#00ffff]maxorator[#ffffff]: i no lik u srvr bai
Title: Re: Gravity
Post by: KAKAN on Aug 31, 2015, 03:42 PM
I actually can't understand what u mean