Raised This Month: $ Target: $400
 0% 

ProKreedz 2.31


Post New Thread Reply   
 
Thread Tools Display Modes
borjomi
Senior Member
Join Date: May 2010
Location: Russia, Novosibirsk
Old 02-28-2011 , 21:56   Re: ProKreedz 2.26
Reply With Quote #391

try func SQL_QuoteString(Handle:db, quoted_name, len, name);
and then use quoted_name instead name

Last edited by borjomi; 02-28-2011 at 21:59.
borjomi is offline
Send a message via ICQ to borjomi
wint5555
Junior Member
Join Date: Jun 2010
Old 03-01-2011 , 04:26   Re: ProKreedz 2.26
Reply With Quote #392

Quote:
Originally Posted by NucL3ra View Post
Copy this entirely:
PHP Code:
public GetNewRank_QueryHandler(iFailStateHandle:hQueryszError[], iErrnumcData[], iSizeFloat:fQueueTime)
{
    new 
id cData[0]
    if( 
iFailState != TQUERY_SUCCESS )
    {
        return 
log_amx("TOP15 SQL: SQL Error #%d - %s"iErrnumszError)
    }
 
    new 
steam[32], authid[32], names[32], name[32], 0
    get_user_authid
(idsteam31)
    
get_user_name(idnames31)
 
    while( 
SQL_MoreResults(hQuery) )
    {
        
i++
        if(
equal(steam"VALVE_ID_LAN") || equal(steam"STEAM_ID_LAN") || strlen(steam) > 18)
        {
            
SQL_ReadResult(hQuery0name31)
            if( 
equal(namenames) )
            {
                
ColorChat(0GREEN"[XJ]^x03 %s^x01 is now on place ^x03%d^x01 in^x03 %s^x01"namesicData[1] == PRO_TOP "Pro 15" "Noob 15");
                break;
            }
        }
        else
        {
            
SQL_ReadResult(hQuery0authid31)
            if( 
equal(authidsteam) )
            {
                
ColorChat(0GREEN"[XJ]^x03 %s^x01 is now on place ^x03%d^x01 in^x03 %s^x01"namesicData[1] == PRO_TOP "Pro 15" "Noob 15");
                break;
            }
        }
        
SQL_NextRow(hQuery)
    }
 
    return 
PLUGIN_CONTINUE    

still cant show~
wint5555 is offline
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 03-01-2011 , 04:32   Re: ProKreedz 2.26
Reply With Quote #393

Shouldn't this work ?
Code:
	replace_all(name, 31, "\", "")
	replace_all(name, 31, "`", "")
	replace_all(name, 31, "'", "")
__________________
My nickname is nucLeaR, I just screwed up at registering and didn't want to change after that X_X.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
wint5555
Junior Member
Join Date: Jun 2010
Old 03-01-2011 , 05:16   Re: ProKreedz 2.26
Reply With Quote #394

Quote:
Originally Posted by NucL3ra View Post
Shouldn't this work ?
Code:
    replace_all(name, 31, "\", "")
    replace_all(name, 31, "`", "")
    replace_all(name, 31, "'", "")
u mean edit to names?
wint5555 is offline
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 03-01-2011 , 05:28   Re: ProKreedz 2.26
Reply With Quote #395

Nope, it just edits the variable that saves the names before sending them into SQL.

The players' name will remain the same.
__________________
My nickname is nucLeaR, I just screwed up at registering and didn't want to change after that X_X.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
wint5555
Junior Member
Join Date: Jun 2010
Old 03-01-2011 , 06:00   Re: ProKreedz 2.26
Reply With Quote #396

Quote:
Originally Posted by NucL3ra View Post
Nope, it just edits the variable that saves the names before sending them into SQL.

The players' name will remain the same.
how to do ?

Last edited by wint5555; 03-01-2011 at 06:02.
wint5555 is offline
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 03-01-2011 , 07:29   Re: ProKreedz 2.26
Reply With Quote #397

It is already there but it renames with ' , ` too. Just delete that symbols.
__________________
My nickname is nucLeaR, I just screwed up at registering and didn't want to change after that X_X.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
STI-ScorpioN
Member
Join Date: Aug 2006
Location: POLAND
Old 03-01-2011 , 16:25   Re: ProKreedz 2.26
Reply With Quote #398

I tried to give an example of replacing the signs on signs UNICDE and then in the php to change it back to utf-8 - but the editor of this forum turns me on versions of Unicode characters utf

Last edited by STI-ScorpioN; 03-01-2011 at 16:43.
STI-ScorpioN is offline
fiodor
Member
Join Date: Mar 2010
Location: Poland
Old 03-01-2011 , 16:30   Re: ProKreedz 2.26
Reply With Quote #399

to remove the invalid characters in SQL is a function: SQL_QuoteString
__________________
fiodor is offline
wint5555
Junior Member
Join Date: Jun 2010
Old 03-02-2011 , 00:03   Re: ProKreedz 2.26
Reply With Quote #400

Quote:
Originally Posted by NucL3ra View Post
It is already there but it renames with ' , ` too. Just delete that symbols.
have two replace_all(name, 31, "`", "\`")

del which one?
wint5555 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:38.


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