AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Fire a non ConVar command (https://forums.alliedmods.net/showthread.php?t=315120)

Blinx 03-23-2019 12:12

Fire a non ConVar command
 
Is it possible to fire a non ConVar console command via Sourcepawn? I understand there's SetConVar for setting the values of ConVars but what if it's a console command supplied by another plugin that doesn't provide forwards?

For my case in particular, I want to fire "sm_map somemap" to change the current map (maybe there's a better way of doing this)

asherkin 03-23-2019 12:14

Re: Fire a non ConVar command
 
https://sm.alliedmods.net/new-api/console/ServerCommand

sm_map just uses the https://sm.alliedmods.net/new-api/ne...rceChangeLevel native though.

https://github.com/alliedmodders/sou...ap.sp#L84-L132 you can just read the source code for the sm_map command.

Blinx 03-23-2019 12:18

Re: Fire a non ConVar command
 
Thank you for the quick and informative response


All times are GMT -4. The time now is 21:08.

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