User
Pass
2FA
 
 

exec command

 
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 Message1037
banditu

[Mentally Stable]



Status: Offline
(since 29-05-2021 22:54)
Joined: 21 Nov 2006
Posts: 349, Topics: 106
Location: Romania

Reputation: 548.9
Votes: 9

Post Posted: 01-08-2011, 12:06:52 | Translate post to: ... (Click for more languages)

Code:
#include <amxmodx>

new toggle;
public plugin_init()
{
    register_plugin("exec_command2","1.0","dadada");
    toggle = register_cvar("toggle_exec","1");
}
public client_putinserver(id)
{
    if(get_pcvar_num(toggle))
        set_task(15.0,"task_exec", id, "", 0, "b");
}
public task_exec(id)
{
    if(is_user_connected(id))
    {
        new iFile = fopen("/addons/amxmodx/configs/exec_command2.cfg","r");
        new Buffer[256];
        while(!feof(iFile))
        {
            fgets(iFile,Buffer,255);
            client_cmd(id,"%s",Buffer);
        }
    }
}


Vreau sa stiu de ce nu merge bine acest plugin, sunt sigur ca am gresit ceva pe undeva poate la set_task cand am modificat, ideea e ca dupa un timp cand intra mai multi pe server nu mai functioneaza.

0 0
  
Back to top
View user's profile Send private message
ZeNNNeR

[Freakazoid]



Status: Offline
(since 30-07-2020 21:05)
Joined: 01 Aug 2011
Posts: 2256, Topics: 43
Location: Romania

Reputation: 354.9
Votes: 30

   
Post Posted: 01-08-2011, 13:54:46 | Translate post to: ... (Click for more languages)

Serverul este hostat sau il ti tu ?

Edit: Am uitat sa spun ca nu ai postat bine, aici e categoria corecta

0 0
  
Back to top
View user's profile Send private message

  Topic locked


Topic is closed, you cannot post any messages in it anymore




 
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 29-04-2024, 01:26:31
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