Raised This Month: $51 Target: $400
 12% 

Help in Script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 11-26-2014 , 06:39   Help in Script
Reply With Quote #1

Code:
#include <amxmodx>

#define PLUGIN "Tagger"
#define VERSION "1.0"
#define AUTHOR "Gullu Bhai"

#define cm(%1)        (sizeof(%1)-1)

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

}

new const g_tag[] = {
}

public client_putinserver(client){
    static szName[32];
    get_user_name(client,szName,charsmax(szName));
    
    if(containi(szName, g_tag) != -1)

    format(szName,charsmax(szName),"%s %s",g_tag,szName);
    set_user_info(client,"name",szName);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang16393\\ f0\\ fs16 \n\\ par }
*/
This is my code and i want to knw hw to add read file from .ini
Code:
new const g_tag[] = { here
}
Because when i add this tag "~=NarC^()~" it shows error because of some simbols so i need a ini file where i can add this tag

Help me plzz
tousif is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-26-2014 , 09:05   Re: Help in Script
Reply With Quote #2

An INI file would be a waste of resources. Tell us what the error is and we can probably help you fix it
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 11-27-2014 , 00:29   Re: Help in Script
Reply With Quote #3

tagger.sma(15) : error 027: invalid character constant tagger.sma(15) : error 027: invalid character constant 2 Errors. Could not locate output file tagger.amx (compile failed).

This is error when i am using new const g_tag[] = "~=NarC^()~";

~=NarC^()~ this tag i need it
tousif is offline
Old 11-28-2014, 03:43
tousif
This message has been deleted by YamiKaitou. Reason: merging duplicate theard
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-28-2014 , 04:22   Re: error 027: invalid character constant
Reply With Quote #4

^ is an escape character. If you want to use it, you need to do: ^^
__________________
Arkshine is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 11-28-2014 , 04:27   Re: error 027: invalid character constant
Reply With Quote #5

Arkshine can u show it in code please

Last edited by tousif; 07-28-2016 at 06:31.
tousif is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 11-28-2014 , 04:53   Re: error 027: invalid character constant
Reply With Quote #6

Quote:
Originally Posted by tousif View Post
Arkshine sir can u show it in code please
Just use 2 ^ instead of 1

^^ instead of ^
__________________
ddhoward is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 11-28-2014 , 04:53   Scripting Help
Reply With Quote #7

#include <amxmodx>

#define PLUGIN "Tagger"
#define VERSION "1.0"
#define AUTHOR "Gullu Bhai"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}

new const g_tag[] = "~=NarC^^()~";

public client_putinserver(client){
static szName[32];
get_user_name(client,szName,charsmax(szName)) ;

format(szName,charsmax(szName),"%s %s",g_tag,szName);
set_user_info(client,"name",szName);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang16393\\ f0\\ fs16 \n\\ par }
*/


This is my script of tag plugin and i want that if player already containg that tag it must ignore tagging

any 1 plzz help
tousif is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 11-28-2014 , 05:20   Re: Scripting Help
Reply With Quote #8

PHP Code:
#include <amxmodx>

#define PLUGIN "Tagger"
#define VERSION "1.0"
#define AUTHOR "Gullu Bhai"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

new const 
g_tag[] = "~=NarC^^()~";

public 
client_putinserver(client){
    static 
szName[32];
    
get_user_name(client,szName,charsmax(szName)) ;

    if (
contain(szNameg_tag) != 0// Check if tag starts at beginning of name.
    
{
        
format(szName,charsmax(szName),"%s %s",g_tag,szName);
        
set_user_info(client,"name",szName);
    }

__________________

Last edited by hleV; 11-28-2014 at 05:21.
hleV is offline
Old 11-28-2014, 05:24
hleV
This message has been deleted by hleV. Reason: Can see from the other thread that you figured it out.
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 11-28-2014 , 05:27   Re: Scripting Help
Reply With Quote #9

hw can i add one more tag to ignore

If that tag also exist ignore like i need to add 4 tags to ignore

plzz help me in this sir

Last edited by tousif; 01-11-2016 at 02:37.
tousif is offline
Old 11-28-2014, 07:20
tousif
This message has been deleted by YamiKaitou. Reason: merging threads, message not needed
Old 11-28-2014, 09:38
YamiKaitou
This message has been deleted by YamiKaitou. Reason: merging threads, message not needed
Old 11-28-2014, 09:53
tousif
This message has been deleted by YamiKaitou. Reason: merging threads, message not needed
Old 11-28-2014, 10:14
tousif
This message has been deleted by YamiKaitou. Reason: merging threads, message not needed
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 11-28-2014 , 10:15   Re: Help in Script
Reply With Quote #10

tagger.sma(2 : error 088: number of arguments does not match definition

PHP Code:
#include <amxmodx>

#define PLUGIN "Tagger"
#define VERSION "1.0"
#define AUTHOR "Gullu Bhai"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

new const 
g_tag[] = "~=NarC^^()~";

new 
g_ig[] = {
"~=NarC^^(S)~",
"~=NarC^^(P)~",
"~=NarC^^(FuN)~",
"~=NarC^^(Fun)~",
"~=NarC^^(O)~",
"~=NarC^^(FUN)~",
"~=NarC^^(C)~"
}

public 
client_putinserver(client){
    static 
szName[32];
    
get_user_name(client,szName,charsmax(szName)) ;

    if (
contain(szNameg_tagg_ig) != 0// Check if tag starts at beginning of name.
    
{
        
format(szName,charsmax(szName),"%s %s",g_tag,szName);
        
set_user_info(client,"name",szName);
    }

this error when using this
PHP Code:
if (contain(szNameg_tagg_ig) != 0// Check if tag starts at beginning of name. 
tousif is offline
Old 11-28-2014, 11:07
smdlateef
This message has been deleted by YamiKaitou. Reason: duplicate
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:52.


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