Raised This Month: $51 Target: $400
 12% 

Execute sm_beacon by plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vaki
Junior Member
Join Date: Nov 2016
Old 01-10-2019 , 15:18   Execute sm_beacon by plugin
Reply With Quote #1

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.
Vaki is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-10-2019 , 15:40   Re: Execute sm_beacon by plugin
Reply With Quote #2

Show your code.

And use player #userid, not client index.
__________________
Do not Private Message @me
Bacardi is offline
Vaki
Junior Member
Join Date: Nov 2016
Old 01-10-2019 , 16:06   Re: Execute sm_beacon by plugin
Reply With Quote #3

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?
Vaki is offline
sdz
Senior Member
Join Date: Feb 2012
Old 01-10-2019 , 16:11   Re: Execute sm_beacon by plugin
Reply With Quote #4

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);

Last edited by sdz; 01-10-2019 at 16:12.
sdz is offline
Vaki
Junior Member
Join Date: Nov 2016
Old 01-10-2019 , 16:59   Re: Execute sm_beacon by plugin
Reply With Quote #5

Good point man about quit and string, i will fix that. Thank you.
Vaki is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:39.


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