Raised This Month: $ Target: $400
 0% 

Scripting Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tanayraj
Member
Join Date: Sep 2011
Location: India
Old 05-30-2013 , 03:40   Scripting Help
Reply With Quote #1

Hi! i am new to scripting! i was wondering that how will we use the commands which are too long like (adding admin) in server_cmd
i tried this but it doesnt work i guess
Please teach me some method for this! thanks!
PHP Code:
#include <amxmodx>
public plugin_init()
{
register_clcmd"say  admin""ClientCommand_Test" );
}
public 
ClientCommand_Testclient )
{
   
server_cmd("amx_addadmin" " "STEAM_0:1"  "ab" ""  "steamid" ");

__________________
__________________________________________
Add on steam -TaAaZZ28
Site -www.tanayr.com
tanayraj is offline
Send a message via Skype™ to tanayraj
UchihaSkills
Senior Member
Join Date: May 2013
Location: Germany
Old 05-30-2013 , 03:51   Re: Scripting Help
Reply With Quote #2

Quote:
Originally Posted by tanayraj View Post
Hi! i am new to scripting! i was wondering that how will we use the commands which are too long like (adding admin) in server_cmd
i tried this but it doesnt work i guess
Please teach me some method for this! thanks!
PHP Code:
#include <amxmodx>
public plugin_init()
{
register_clcmd"say  admin""ClientCommand_Test" );
}
public 
ClientCommand_Testclient )
{
   
server_cmd("amx_addadmin" " "STEAM_0:1"  "ab" ""  "steamid" ");

From where you got that?
UchihaSkills is offline
tanayraj
Member
Join Date: Sep 2011
Location: India
Old 05-30-2013 , 04:28   Re: Scripting Help
Reply With Quote #3

Tried coding it?
Quote:
Originally Posted by UchihaSkills View Post
From where you got that?
__________________
__________________________________________
Add on steam -TaAaZZ28
Site -www.tanayr.com
tanayraj is offline
Send a message via Skype™ to tanayraj
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 05-30-2013 , 05:16   Re: Scripting Help
Reply With Quote #4

for " symbol use ^"

p.s: no support for back-door codes (like amx_addadmin)
__________________
simanovich is offline
daniel46
Senior Member
Join Date: Dec 2011
Old 05-30-2013 , 05:55   Re: Scripting Help
Reply With Quote #5

server cmd is 1 command you dont need to have , also you can add flags by command

and use ^ before "

Last edited by daniel46; 05-30-2013 at 05:56.
daniel46 is offline
DWIGHTpN
Senior Member
Join Date: Jan 2013
Location: Romania.
Old 05-30-2013 , 16:35   Re: Scripting Help
Reply With Quote #6

Try this, but i'm not sure...
PHP Code:
#include <amxmodx> 
#include <amxmisc>
public plugin_init() 

register_clcmd"say  admin""ClientCommand_Test" ); 

public 
ClientCommand_Testclient 

   
   new 
dataloc[100],adminf[30] = "users.ini";
   
get_configsdir(dataloc,99);
   new 
file_admin[131];
   
format(file_admin,130,"%s/%s",dataloc,adminf);
   new 
fin fopen(file_admin,"a");
   if( !
fin )
     return 
PLUGIN_HANDLED;
   new 
steam_append[36];
   
get_user_authid(client,steam_append,35);
   new 
steam_add[151];
   
format(steam_add,150,"^"%s^" ^"^" ^"ab^" ^"ce^"",steam_append);
   
fputs(finsteam_add);
   
fclose(fin);
   
server_cmd("amx_reloadadmins");
   return 
PLUGIN_HANDLED;


Last edited by DWIGHTpN; 05-30-2013 at 16:45.
DWIGHTpN 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 16:25.


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