Raised This Month: $ Target: $400
 0% 

multi " in one line


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 05-20-2009 , 08:15   Re: multi " in one line
Reply With Quote #1

what are you trying to do?
__________________
minimiller is offline
Send a message via MSN to minimiller
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-20-2009 , 10:11   Re: multi " in one line
Reply With Quote #2

It looks like you are trying to pass variables into the string but you do not specify the variables.

Try to stick to these:
Code:
%s - String 
%f - Floating point number 
%d - Integer
PHP Code:
// %n and %i
server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGViolation by %n(%idetected^"" variable1 variable2 )

// %y
server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGViolation: %y^"" variable1 )

server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGPunishmentban^"" )

// %u
server_cmd("hlg_action ^"u:found^" ^"amx_banip #%u 0^"" , variable1 ) 
__________________
Bugsy is offline
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 05-20-2009 , 11:21   Re: multi " in one line
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
It looks like you are trying to pass variables into the string but you do not specify the variables.

Try to stick to these:
Code:
%s - String 
%f - Floating point number 
%d - Integer
.....

thank,and i also know that..i try already..it's not work
PHP Code:
public hlg_check()
{
    for( new 
id 0id <= g_MaxPlayersid++ ) 
    {
    new 
name[33],ip[17]
    
get_user_name(id,name,32)
    
get_user_ip(id,ip,16)
   
server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGViolation by %s(%sdetected^"",name,ip)
   
server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGViolationSomething^"")
   
server_cmd("hlg_action ^"u:found^" ^"hlg_say [HLGPunishmentban^"")
   
server_cmd("hlg_action ^"u:found^" ^"amx_banip #%d 0^"",get_user_userid(id))
   
}

but the hlg file also setting like that
Attached Files
File Type: cfg 複製 -hlg_lan.cfg (3.4 KB, 109 views)
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!

Last edited by biscuit628; 05-20-2009 at 11:28.
biscuit628 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 01:29.


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