Raised This Month: $ Target: $400
 0% 

How to make "a = b" in AMXX scripting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Eyup
Junior Member
Join Date: Apr 2022
Old 04-23-2022 , 12:39   Re: How to make "a = b" in AMXX scripting
Reply With Quote #1

Quote:
Originally Posted by Bugsy View Post
Try
PHP Code:
new const LetterI[] = "i";
new const 
LetterP[] = "p";

new const 
LettersRA[] = "ra";
new const 
LettersTE[] = "te";

new 
szRate];
formatexszRate charsmaxszRate ) , "%s%s" LettersRA LettersTE );

get_user_info(iPlayers[iNum], szRateUserRate8); 
Show's blank either.
Eyup is offline
zXCaptainXz
Member
Join Date: May 2017
Old 04-23-2022 , 12:43   Re: How to make "a = b" in AMXX scripting
Reply With Quote #2

Please show us what you are doing exactly
zXCaptainXz is offline
Eyup
Junior Member
Join Date: Apr 2022
Old 04-23-2022 , 12:48   Re: How to make "a = b" in AMXX scripting
Reply With Quote #3

Quote:
Originally Posted by zXCaptainXz View Post
Please show us what you are doing exactly
My total code is this;

PHP Code:
#include <amxmodx>

#define PLUGIN "Rate Founder"
#define VERSION "1.0"
#define AUTHOR "Eyup - #NoMercy"

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR)


new const 
LOGTOFILE[] = "loglar.log"

public client_authorized(id) {
new 
a;
'r';
new 
name[32], rate[50];
get_user_name(idnamecharsmax(name));
get_user_info(idfmt"'%d'ate"), ratecharsmax(rate));
log_to_file(LOGTOFILE"Oyuncu '%s' Baglandi. Rate: '%s'"namerate)

Eyup is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-23-2022 , 12:52   Re: How to make "a = b" in AMXX scripting
Reply With Quote #4

Try
PHP Code:
public client_authorized(id
{
    new 
RateWord] = "bate";
    
RateWord[0] = 'r';
    new 
name[32], rate[50];
    
get_user_name(idnamecharsmax(name));
    
get_user_info(idRateWordratecharsmax(rate));
    
log_to_file(LOGTOFILE"Oyuncu '%s' Baglandi. Rate: '%s'"namerate)

__________________
Bugsy is offline
Eyup
Junior Member
Join Date: Apr 2022
Old 04-23-2022 , 13:10   Re: How to make "a = b" in AMXX scripting
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
Try
PHP Code:
public client_authorized(id
{
    new 
RateWord] = "bate";
    
RateWord[0] = 'r';
    new 
name[32], rate[50];
    
get_user_name(idnamecharsmax(name));
    
get_user_info(idRateWordratecharsmax(rate));
    
log_to_file(LOGTOFILE"Oyuncu '%s' Baglandi. Rate: '%s'"namerate)

Sorry but still blank.

Last edited by Eyup; 04-23-2022 at 13:10.
Eyup is offline
zXCaptainXz
Member
Join Date: May 2017
Old 04-23-2022 , 13:20   Re: How to make "a = b" in AMXX scripting
Reply With Quote #6

Quote:
Originally Posted by Eyup View Post
Sorry but still blank.
I don’t know how that host is preventing you from using the word "rate", I can only recommend you try removing it from all parts of your code, even your variable names…
PHP Code:
new String] = "bate";
String[0] = 'r';

public 
client_authorized(id
{
    new 
name[32], info[50];
    
get_user_name(idnamecharsmax(name));
    
get_user_info(idStringinfocharsmax(info));
    
log_to_file(LOGTOFILE"Oyuncu '%s' Baglandi. %s: '%s'"nameStringinfo)


Last edited by zXCaptainXz; 04-23-2022 at 13:20. Reason: php tags
zXCaptainXz is offline
Eyup
Junior Member
Join Date: Apr 2022
Old 04-23-2022 , 13:23   Re: How to make "a = b" in AMXX scripting
Reply With Quote #7

Quote:
Originally Posted by zXCaptainXz View Post
I don’t know how that host is preventing you from using the word "rate", I can only recommend you try removing it from all parts of your code, even your variable names…
PHP Code:
new String] = "bate";
String[0] = 'r';

public 
client_authorized(id
{
    new 
name[32], info[50];
    
get_user_name(idnamecharsmax(name));
    
get_user_info(idStringinfocharsmax(info));
    
log_to_file(LOGTOFILE"Oyuncu '%s' Baglandi. %s: '%s'"nameStringinfo)

I don't know how it is preventing too. In my host, You can upload only sma files. And compile it through panel. And some words are banned. I don't know how they're able to do that but they just do. Btw, this code doesn't work too :/
Eyup is offline
zXCaptainXz
Member
Join Date: May 2017
Old 04-23-2022 , 13:26   Re: How to make "a = b" in AMXX scripting
Reply With Quote #8

Quote:
Originally Posted by Eyup View Post
I don't know how it is preventing too. In my host, You can upload only sma files. And compile it through panel. And some words are banned. I don't know how they're able to do that but they just do. Btw, this code doesn't work too :/
Any logs/errors? Does it log anything in the first place? And if it does, does it leave the rate area blank? I will test it myself when I get home, maybe there’s something we are missing here..
zXCaptainXz is offline
zXCaptainXz
Member
Join Date: May 2017
Old 04-23-2022 , 16:12   Re: How to make "a = b" in AMXX scripting
Reply With Quote #9

Code:
PHP Code:
#include <amxmodx>

new String] = "bate";

public 
plugin_init()
{    
    
String[0] = 'r';
}

public 
client_authorized(id
{
    new 
name[32], info[50];
    
get_user_name(idnamecharsmax(name));
    
get_user_info(idStringinfocharsmax(info));
    
log_to_file("loglar.log""Oyuncu '%s' Baglandi. %s: '%s'"nameStringinfo)

Output
Quote:
L 04/23/2022 - 23:10:59: Oyuncu 'GC | zXCaptainXz' Baglandi. rate: '100000'
zXCaptainXz is offline
Eyup
Junior Member
Join Date: Apr 2022
Old 04-24-2022 , 08:08   Re: How to make "a = b" in AMXX scripting
Reply With Quote #10

Quote:
Originally Posted by zXCaptainXz View Post
Code:
PHP Code:
#include <amxmodx>

new String] = "bate";

public 
plugin_init()
{    
    
String[0] = 'r';
}

public 
client_authorized(id
{
    new 
name[32], info[50];
    
get_user_name(idnamecharsmax(name));
    
get_user_info(idStringinfocharsmax(info));
    
log_to_file("loglar.log""Oyuncu '%s' Baglandi. %s: '%s'"nameStringinfo)

Output
Oh, okey that works now. Thanks! I have one more question, what is the maximum values of info's that we can get from user? like rates,ex_interps,updaterate,cmdrate?
Eyup 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 21:21.


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