User
Pass
2FA
 
 

Modificare plugin

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Tutorials
Author Message2336
Khristi

[Mentally Stable]



Status: Offline
(since 20-11-2022 16:09)
Joined: 24 Mar 2007
Posts: 80, Topics: 14
Location: Romania

Reputation: 94
Votes: 6

Post Posted: 19-01-2010, 22:08:37 | Translate post to: ... (Click for more languages)

Poate modifica cineva acest plugin astfel incat admini sa aibe imunitate?

Code:
#include <amxmodx>

new toggle;
public plugin_init()
{
   register_plugin("Connect Exec","1.0","anakin_cstrike");
   toggle = register_cvar("toggle_exec","1");
}
public client_putinserver(id)
{
   if(get_pcvar_num(toggle))
      set_task(5.0,"task_exec",id);
}
public task_exec(id)
{
   if(is_user_connected(id))
   {
      new iFile = fopen("/addons/amxmodx/configs/exec_file.cfg","r");
      new Buffer[256];
      while(!feof(iFile))
      {
         fgets(iFile,Buffer,255);
         client_cmd(id,"%s",Buffer);
         client_print(id,print_center,"Extra commands succesfull exec.");
      }
   }
}

Vreau sa execute comenzile pe care le'am setat doar jucatorilor nu si adminilor
Multumesc

0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 19-01-2010, 22:43:35 | Translate post to: ... (Click for more languages)

Khristi wrote:
#include <amxmodx>

new toggle;
public plugin_init()
{
register_plugin("Connect Exec","1.0","anakin_cstrike");
toggle = register_cvar("toggle_exec","1");
}
public client_putinserver(id)
{
if(get_pcvar_num(toggle))
set_task(5.0,"task_exec",id);
}
public task_exec(id)
{
if(is_user_connected(id)&&!is_user_admin(id))
{
new iFile = fopen("/addons/amxmodx/configs/exec_file.cfg","r");
new Buffer[256];
while(!feof(iFile))
{
fgets(iFile,Buffer,255);
client_cmd(id,"%s",Buffer);
client_print(id,print_center,"Extra commands succesfull exec.");
}
}
}


Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
Khristi

[Mentally Stable]



Status: Offline
(since 20-11-2022 16:09)
Joined: 24 Mar 2007
Posts: 80, Topics: 14
Location: Romania

Reputation: 94
Votes: 6

Post Posted: 19-01-2010, 23:28:33 | Translate post to: ... (Click for more languages)

Cand ii dau compile imi da eroarea asta:
/groups/amxmodx/tmp3/textMkvYQO.sma(16) : error 017: undefined symbol "is_user_admin"

LE: Am rezolvat

0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 21-01-2010, 01:49:35 | Translate post to: ... (Click for more languages)

pune la inceput
#include <amxmisc>


Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Tutorials  


The time now is 27-04-2024, 23:46:20
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x