Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Yankee on Aug 30, 2017, 07:35 PM

Title: Player Chat Function Need Help
Post by: Yankee on Aug 30, 2017, 07:35 PM
Hi,I make this function and it make the server crashed.I'm not good at scripting.Can someone fix it.I want players can't type without spawn.
function onPlayerChat( player, text )
{
if ( !player.IsSpawned ) MessagePlayer( "[#FF0000][ERROR] - [#F7FE2E]You have to be spawned.", player );
else print( player.Name + ": " + text );
return 1;
}
Title: Re: Player Chat Function Need Help
Post by: Xenon on Aug 30, 2017, 08:10 PM
try ;p
function onPlayerChat( player, text ) {
if ( !player.IsSpawned ){
MessagePlayer( "[#FF0000][ERROR] - [#F7FE2E]You have to be spawned.", player );
return 0;
}
else print( player.Name + ": " + text );
return 1;
}