User
Pass
2FA
 
 

Ajutor : 2 erori 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) -> Resources
Author Message1987
blana

[Mentally Stable]



Status: Offline
(since 13-03-2012 07:21)
Joined: 31 Jan 2009
Posts: 14, Topics: 4
Location: Romania

Reputation: 233.2
Votes: 4

Post Posted: 10-06-2011, 22:15:48 | Translate post to: ... (Click for more languages)

Problema nr 1 :


Code:
public cmdScreenBan(id,level,cid){
   if(!cmd_access(id,level,cid,2))
      return PLUGIN_HANDLED;

   new authid[32], admin_name[32], ipadd[32], name[32], CurrentTime[9], hostname[64] ,banurl[64]
   new arg[32], arg2[32], temp[2]
   
   read_argv(1,arg,31)
   read_argv(2,arg2,31)
   
   new target = cmd_target(id,arg,1)
   
   if (!target) return PLUGIN_HANDLED

   get_user_ip(target,ipadd,31)
   get_cvar_string("hostname",hostname,63)
   get_user_name(id, name, 31)
   get_user_name(id, admin_name, 31)
   get_user_authid(target,authid,31)
   get_cvar_string("hell_banurl", banurl,63)
   get_time("%d/%m/%Y - %H:%M:%S",CurrentTime,31)

   
   log_to_file("hell_banip.txt","Nume: %s, IP: %s, STEAM: %s, BANNAT DE: %s",name,ipadd,authid,admin_name)

   client_print(target,print_chat, "[B-S] Banat pe: %s",hostname)
   client_print(target,print_chat, "[B-S] Nume: %s | IP: %s | STEAM: %s",name,ipadd,authid)    
   client_print(target,print_chat, "[B-S] Banat la data si ora: %s | De catre: %s",CurrentTime,admin_name)
   client_print(target,print_chat, "[B-S] Posteaza pozele pe %s pentru a fi debanat.",banurl)
   
   
   new tname[32]
   new player = cmd_target(id,arg,31)
   get_user_name(player,tname,31);
   
   console_print(target,"[B-S] Banat pe: %s",hostname)
   console_print(target,"[B-S] Nume: %s | IP: %s | STEAM: %s",name,ipadd,authid)
   console_print(target,"[B-S] Banat la data si ora: %s | De catre: %s",CurrentTime,admin_name)
   console_print(target,"[B-S] Posteaza pozele pe %s pentru a fi debanat",banurl)

   
   client_cmd(target,"wait;wait;snapshot;wait;snapshot")
   
   temp[0] = target
   temp[1] = str_to_num(arg2)
   
   set_task(0.5,"persontoban", target, temp, 2)
   [/quote]
   return PLUGIN_HANDLED


la comanda banip se fac 2 poze automat. Dar in locul unde ar trebui sa apara numele celui banat apare "1" . Isi da seama cineva unde am gresit ???? ca eu ma chinui de 2 zile
Quote:
L 06/08/2011 - 20:20:36: Nume: 1 - 20:20:36, IP: 79.118.246.39:27005, STEAM: STEAM_0:0:29477474, BANNAT DE: Blana



Problema nr 2 si 3 :

Quote:
new name_a[32], name_p[32];
new authid_a[35], authid_p[35];
get_user_name(id, name_a, 31);
get_user_name(player, name_p, 31);
get_user_authid(id, authid_a, 35);
get_user_authid(id, authid_p, 35);
show_activity(id, "[H-Z]Adminul: %s i-a dat gag lui %s %s!", name_a, name_p, gagtype);
log_to_file("hell_gag.txt","Adminul :%s i-a dat gag lui %s GEN: %s", name_a, name_p, gagtype);

format(name_p, 31, "%s%s", g_TextGagTag, name_p);
g_AllowNameChange[player] = true;
set_user_name(player, name_p);

g_TextGagged[player] = true;
g_TextGagTime[player] = gagtime;
return PLUGIN_HANDLED;
}

public concmd_Ungag(id, level, cid)
{
if(!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED;

new arg[35];
read_argv(1, arg, 31);
new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY);
if(!player)
return PLUGIN_HANDLED;

if(!g_TextGagged[player])
{
client_print(id, print_console, "[H-Z] Jucatorul NU a primit gag!");
return PLUGIN_HANDLED;
}

new name_a[32], name_p[32];
new authid_a[35], authid_p[35];
get_user_name(id, name_a, 31);
get_user_name(player, name_p, 31);
get_user_authid(id, authid_a, 35);
get_user_authid(id, authid_p, 35);
deletei(name_p, g_TextGagTag);
show_activity(id, "[H-Z]Adminul: %s i-a scos gag-ul lui %s!", name_a, name_p);
log_to_file("hell_gag.txt","Adminul :%s i-a scos gag`ul lui %s", name_a, name_p);

g_AllowNameChange[player] = true;
set_user_name(player, name_p);

g_TextGagged[player] = false;
g_TextGagTime[player] = 0.0;
if(task_exists(player + 112233))
remove_task(player + 112233);

return PLUGIN_HANDLED;
}

public concmd_Mute(id, level, cid)
{
if(!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED;

new arg[35];
read_argv(1, arg, 34);
new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY);
if(!player)
return PLUGIN_HANDLED;

if(g_Muted[player])
{
client_print(id, print_console, "[H-Z] Jucatorul a primit deja mute!");
return PLUGIN_HANDLED;
}

new Float:mutetime;
if(read_argc() > 2)
{
read_argv(2, arg, 31);
mutetime = str_to_float(arg) * 60.0;
if(mutetime < 60.0)
mutetime = DEFAULT_MUTE_TIME * 60.0;
}
else
mutetime = -1.0;

new mutetype[32];
if(!(mutetime > -1.0))
formatex(mutetype, 31, "until next map");
else
{
formatex(mutetype, 31, "for %.2f minutes", mutetime);
set_task(mutetime, "task_UnmutePlayer", id + 223344);
}

new name_a[32], name_p[32];
new authid_a[35], authid_p[35];
get_user_name(id, name_a, 31);
get_user_name(player, name_p, 31);
get_user_authid(id, authid_a, 35);
get_user_authid(id, authid_p, 35);
show_activity(id, "[H-Z]Adminul: %s i-a dat mute lui %s %s!", name_a, name_p, mutetype);
log_to_file("hell_mute.txt","Adminul %s i-a dat mute lui %s GEN: %s", name_a, name_p, mutetype);

format(name_p, 31, "%s%s", g_MutedTag, name_p);
g_AllowNameChange[player] = true;
set_user_name(player, name_p);

g_Muted[player] = true;
g_MutedTime[player] = mutetime;
set_speak(player, SPEAK_MUTED);
return PLUGIN_HANDLED;
}

public concmd_Unmute(id, level, cid)
{
if(!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED;

new arg[35];
read_argv(1, arg, 31);
new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY);
if(!player)
return PLUGIN_HANDLED;

if(!g_Muted[player])
{
client_print(id, print_console, "[H-Z] Clientul nu a primit mute!");
return PLUGIN_HANDLED;
}

new name_a[32], name_p[32];
new authid_a[35], authid_p[35];
get_user_name(id, name_a, 31);
get_user_name(player, name_p, 31);
get_user_authid(id, authid_a, 35);
get_user_authid(id, authid_p, 35);
deletei(name_p, g_MutedTag);
show_activity(id, "[H-Z]Adminul: %s i-a scos mute-ul lui %s!", name_a, name_p);
log_to_file("hell_mute.txt","Adminul %s i-a scos mute-ul lui %s ", name_a, name_p);

g_AllowNameChange[player] = true;
set_user_name(player, name_p);

g_Muted[player] = false;
g_MutedTime[player] = 0.0;
if(task_exists(player + 223344))
remove_task(player + 223344);

return PLUGIN_HANDLED;
}

public clcmd_Say(id)
{
return g_TextGagged[id] ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
}

public task_UngagPlayer(id)
{
id -= 112233;

new name[32];
get_user_name(id, name, 31);
client_print(0, print_chat, "[H-Z] %s Nu mai are gag!", name);

g_TextGagged[id] = false;
g_TextGagTime[id] = 0.0;
}

public task_UnmutePlayer(id)
{
id -= 223344;

new name[32];
get_user_name(id, name, 31);
client_print(0, print_chat, "[H-Z] %s Nu mai are mute!", name);

g_Muted[id] = false;
g_MutedTime[id] = 0.0;
}

set_user_name(id, const name[])
{
set_user_info(id, "name", name);
client_cmd(id, "name ^"%s^"", name);
}

deletei(text[], const what[])
{
new pos = containi(text, what);
new len, i;
while(pos >= 0)
{
len = strlen(what);
i = 0;
while(text[pos+len+i] != 0)
{
text[pos+i] = text[pos+len+i];
i++;
}
text[pos+i] = '^0';
pos = containi(text, what);
}


In chat apare cam asa :

Code:
Deamon [H-Z]Adminul  :  i-a dat gag lui  !: Blana
Deamon [H-Z]Adminul : i-a scos gag-ul lui !: [GAG]Blana

Deamon [H-Z]Adminul:  i-a dat mute lui  !: Blana
Deamon [H-Z]Adminul:  i-a scos mute-ul lui !: [MUTE]Blana



Si ar fii trebuit sa apara cam asa

Code:
Deamon [H-Z]Adminul : [color=red]X[/color] i-a dat gag lui : Blana
Deamon [H-Z]Adminul : [color=red]X[/color] i-a scos gag-ul lui: [GAG]Blana

Deamon [H-Z]Adminul : [color=red]X[/color] i-a dat mute lui : Blana
Deamon [H-Z]Adminul : [color=red]X[/color] i-a scos mute-ul lui : [MUTE]Blana



Stie careva pe unde ii "buba" la problemele astea?

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

[prin vacante]



Status: Offline
(since 10-12-2018 10:49)
Joined: 30 Jan 2008
Posts: 7503, Topics: 333
Location: Romania

Reputation: 1770.2
Votes: 191

 
Post Posted: 10-06-2011, 22:30:35 | Translate post to: ... (Click for more languages)

La prima problema trebuie:
Code:
get_user_name(target, name, 31)

in loc de
Code:
get_user_name(id, name, 31)



0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
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: 10-06-2011, 22:40:14 | Translate post to: ... (Click for more languages)

La partea a doua, este bine. Vezi poate ai uitat sã copiezi pe server pluginul nou compilat.

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

[Mentally Stable]



Status: Offline
(since 13-03-2012 07:21)
Joined: 31 Jan 2009
Posts: 14, Topics: 4
Location: Romania

Reputation: 233.2
Votes: 4

Post Posted: 10-06-2011, 23:22:26 | Translate post to: ... (Click for more languages)

Ms ion#mzq am facut cum ai spus tu si o mers in print si consola , dar in log tot nr "1" apare.


la partea a 2 a :


Adminul : Blana
Cel care a primit gag : DarkBlader

Quote:

Deamon [H-Z]Adminul : i-a dat gag lui : Blana
Deamon [H-Z]Adminul : i-a scos gag`ul lui : Blana


Eroarea asta apare in chat , ca in log-ul facut apare bine
Quote:

L 06/11/2011 - 00:13:25: Adminul :Blana i-a dat gag lui DarkBlader GEN: until next map
L 06/11/2011 - 00:13:34: Adminul :Blana i-a scos gag`ul lui DarkBlader

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

[Mentally Stable]



Status: Offline
(since 13-03-2012 07:21)
Joined: 31 Jan 2009
Posts: 14, Topics: 4
Location: Romania

Reputation: 233.2
Votes: 4

Post Posted: 15-06-2011, 23:32:45 | Translate post to: ... (Click for more languages)

PRobleme rezolvate , inafara de una noua ,,,,,

La gag daca dai unei persoane gag de exemplu 1 minute , dupa trecerea timpului , se pare ca nu ii da ungag ii aplica comanda de ungag adminului care o dat gag-ul

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

[prin vacante]



Status: Offline
(since 10-12-2018 10:49)
Joined: 30 Jan 2008
Posts: 7503, Topics: 333
Location: Romania

Reputation: 1770.2
Votes: 191

 
Post Posted: 16-06-2011, 01:42:41 | Translate post to: ... (Click for more languages)

Pune:
Code:
set_task(mutetime, "task_UnmutePlayer", player + 223344);


In loc de:
Code:
set_task(mutetime, "task_UnmutePlayer", id + 223344);



0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
blana

[Mentally Stable]



Status: Offline
(since 13-03-2012 07:21)
Joined: 31 Jan 2009
Posts: 14, Topics: 4
Location: Romania

Reputation: 233.2
Votes: 4

Post Posted: 16-06-2011, 12:44:31 | Translate post to: ... (Click for more languages)

eroare de compilare cu player , "undefined simbol player"
0 0
  
Back to top
View user's profile Send private message
ion

[prin vacante]



Status: Offline
(since 10-12-2018 10:49)
Joined: 30 Jan 2008
Posts: 7503, Topics: 333
Location: Romania

Reputation: 1770.2
Votes: 191

 
Post Posted: 16-06-2011, 19:25:14 | Translate post to: ... (Click for more languages)

Pune si tu link cu fisierul .sma.


0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
blana

[Mentally Stable]



Status: Offline
(since 13-03-2012 07:21)
Joined: 31 Jan 2009
Posts: 14, Topics: 4
Location: Romania

Reputation: 233.2
Votes: 4

Post Posted: 16-06-2011, 19:27:40 | Translate post to: ... (Click for more languages)

http://www.girlshare.ro/2292937.9
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) -> Resources  


The time now is 13-12-2024, 19:23:03
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