Console /gametext [message] command?
#1

Hello everyone!

I actually saw some minutes ago that if you type in your server console (the
black one, you know what I mean) say [message] , in-game it shows like this :

"* Admin : [message]" (in-game ofcourse).

The question is , is it possible to make a console command like gametext [message]
and it will show from all players a gametext? For example :

You type in the console "gametext hi i am a noob wtf you want"

And for the players in-game (for everyone) it shows it : "hi i am a noob wtf you want"

Thank you very much!

P.S.If it's not possible I will make the command in game.

-jNkk
Reply
#2

So far it's impossible from rcon console level.
It could be very cool, if SAMP team make command which allows to use server commands (from e.g. gamemode or filterscripts). It could be very cool and very usefull.
But, they decides
~LetsOWN
Reply
#3

Thank you!

Other Suggestions ?

-jNkk
Reply
#4

Quote:
Originally Posted by LetsOWN[PL]
Посмотреть сообщение
So far it's impossible from rcon console level.
It's very possible. Just fiddle around with the OnRconCommand callback.
Reply
#5

Thanks , but I'm new at scripting and I really don't know how to do it
Can you guys give me some info / the code for this command?

-jNkk
Reply
#6

pawn Код:
public OnRconCommand( cmd[ ] )
{
    if( !strcmp( cmd, "text", true, 4 ) )
        GameTextForAll( cmd[ 5 ], 3000, 3 );
    return 1;
}
Untested, should work, go to RCON and type "text [Message]".
Reply
#7

Quote:
Originally Posted by LetsOWN[PL]
Посмотреть сообщение
So far it's impossible from rcon console level.
It could be very cool, if SAMP team make command which allows to use server commands (from e.g. gamemode or filterscripts). It could be very cool and very usefull.
But, they decides
~LetsOWN
lmfao it's not impossible...

For the topic starter, use Mean (above poster)'s example above.
Reply
#8

Quote:
Originally Posted by Mean
Посмотреть сообщение
pawn Код:
public OnRconCommand( cmd[ ] )
{
    if( !strcmp( cmd, "text", true, 4 ) )
        GameTextForAll( cmd[ 5 ], 3000, 3 );
    return 1;
}
Untested, should work, go to RCON and type "text [Message]".
I use a lot of commands lik this, and I've discovered you can also use it ingame with "/rcon"

EXAMPLE: "/rcon text hello" will 'gametext' "hello" to all
Reply
#9

@ Sasino : I don't want the command in game because I know how to do it...

@Mean , Otto : Thanks , I will try later, I have much homework for tomorrow.

-jNkk
Reply
#10

Quote:
Originally Posted by Mean
Посмотреть сообщение
pawn Код:
public OnRconCommand( cmd[ ] )
{
    if( !strcmp( cmd, "text", true, 4 ) )
        GameTextForAll( cmd[ 5 ], 3000, 3 );
    return 1;
}
Untested, should work, go to RCON and type "text [Message]".
Don't work with me :S

I tried this too:

pawn Код:
public OnRconCommand( cmd[ ] )
{
    if( !strcmp( cmd, "text", true, 4 ) )
        SendClientMessageToAlll(COLOR_LIGHTBLUE, cmd[ 5 ]);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)