Force a player to run a command
#1

Hello,

I want to force a player that joins to run the /audiomsg command so they don't see the audio stream urls.

Is there a way to force a player to run a specific command?
Reply
#2

Quote:
Originally Posted by BigBrainAFK
Посмотреть сообщение
Hello,

I want to force a player that joins to run the /audiomsg command so they don't see the audio stream urls.

Is there a way to force a player to run a specific command?
Using yini commands
Command_ReProcess(player, "/audiomsg", false);
Reply
#3

Is there a way without yini commands?
Reply
#4

You can put the contents of /audiomessage into a new public and set it to both the command and OnPlayerConnect?
Reply
#5

Well it's a client side command so I don't know if it will work.
Reply
#6

Ah well I never knew that existed :P
Ehm no I dont see any other way than using the yini thing but maybe someone else can think of something!
Reply
#7

Try this one - https://sampforum.blast.hk/showthread.php?pid=3489218#pid3489218


EDIT:
Sorry, didn't read your topic carefully, i don't think its possible because its a client side so he have to type it himself.
Reply
#8

Well thats just forcing a player to run zcmd commands. This won't work for native client sided commnds I guess.
Reply
#9

if you are using zcmd then this

pawn Код:
CMD:forceradio (playerid, params[])
{
    new str[128], id, input;
    if(sscanf(params, "ui", id,input)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /forceradio [ID][1,2,3]");
    if(!IsPlayerConnected(id))  return SendClientMessage(playerid, COLOR_RED, "Player is not connected!");
    if(playerid == id)return SendClientMessage(playerid, COLOR_NORMALBLUE, "You forced yourself to to play a radio");
    SendClientMessage(playerid,-1,"You forced a player to play a radio!");
    SendClientMessage(id,-1,"You were forced by an admin to play a radio!");
    cmd_audiomsg(id,input);
    return 1;
}
Reply
#10

You can not force the player to hide those messages. They could still find out somehow, and players should know what material you're streaming so there's really no point in hiding that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)