AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Execute sm_beacon by plugin (https://forums.alliedmods.net/showthread.php?t=313465)

Vaki 01-10-2019 15:18

Execute sm_beacon by plugin
 
I want to execute command sm_beacon on player, i tried with ServerCommand("sm_beacon #%i", param1); and ServerCommand("sm_beacon %i", param1); but did not worked.

Bacardi 01-10-2019 15:40

Re: Execute sm_beacon by plugin
 
Show your code.

And use player #userid, not client index.

Vaki 01-10-2019 16:06

Re: Execute sm_beacon by plugin
 
Thank you, i solved with ServerCommand("sm_beacon %s", ime); - using string instead ID i did not know how to get this thing work with Player ID. Anyway do you know how to disable notifications in chat about using this?

sdz 01-10-2019 16:11

Re: Execute sm_beacon by plugin
 
hopefully you're not targeting by name, because there is nothing stopping a player from coming into the server with the name ";sm_rcon quit" and running your code if you're using automatic name based targeting
perhaps you should read into how targeting works and what the difference between a userid and a client index is?

in any sense, assuming "param1" is our clients' index, you'll want to use GetClientUserId(param1);

Vaki 01-10-2019 16:59

Re: Execute sm_beacon by plugin
 
Good point man about quit and string, i will fix that. Thank you.


All times are GMT -4. The time now is 18:22.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.