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

What's %s and others.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Guppy488
Member
Join Date: Jul 2010
Location: Guppy's Scripting Lab
Old 06-23-2011 , 07:09   What's %s and others.
Reply With Quote #1

hi, i'm wondering what's % ,%s , %d and %L, how do i use them?
also if i'm to log a player msg's msg when he type /log <msg> it'll log down that specific player msg to a file. so if he didn't type /log <his msg> it wont log down his message is that possible?

Last edited by Guppy488; 06-23-2011 at 07:18.
Guppy488 is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 06-23-2011 , 07:19   Re: What's %s and others.
Reply With Quote #2

For your first question
%s - string
%d - integer
%i - integer
%L - string from multilanguage file

client_print(id,print_chat," Your level is : %d Your class is : %s", 25, "BlackSpider")
__________________
Working on mods..
byetovice is offline
Guppy488
Member
Join Date: Jul 2010
Location: Guppy's Scripting Lab
Old 06-23-2011 , 07:29   Re: What's %s and others.
Reply With Quote #3

so how does %s , %d works?
Guppy488 is offline
DjOptimuS
Senior Member
Join Date: Jan 2009
Old 06-23-2011 , 07:52   Re: What's %s and others.
Reply With Quote #4

http://wiki.alliedmods.net/Pawn_Tutorial

A quick sample

PHP Code:
new integer 5;
new 
string[] = "This is string number";

client_print(0print_chat"%s %i"stringinteger); 
This will output
Code:
This is string number 5

Last edited by DjOptimuS; 06-23-2011 at 07:54.
DjOptimuS is offline
Guppy488
Member
Join Date: Jul 2010
Location: Guppy's Scripting Lab
Old 06-23-2011 , 08:09   Re: What's %s and others.
Reply With Quote #5

Quote:
Originally Posted by DjOptimuS View Post
http://wiki.alliedmods.net/Pawn_Tutorial

A quick sample

PHP Code:
new integer 5;
new 
string[] = "This is string number";

client_print(0print_chat"%s %i"stringinteger); 
This will output
Code:
This is string number 5
how can i log a player message when he type /log <his own message> it'll log it into a file.
Guppy488 is offline
Schwabba
Senior Member
Join Date: Apr 2008
Old 06-23-2011 , 11:36   Re: What's %s and others.
Reply With Quote #6

log_to_file
Schwabba is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 06-23-2011 , 11:55   Re: What's %s and others.
Reply With Quote #7

Register command 'say' and if the first 4 characters in the string said are /log, then you can use 'parse' to split it up. Then log the text to a file.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
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 14:27.


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