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

Print Message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Groven
AlliedModders Donor
Join Date: Apr 2011
Location: Sweden
Old 12-28-2013 , 13:16   Print Message
Reply With Quote #1

Hello. Im new to scripting and I tried to do something with
PHP Code:
%
but it wont work in someway, I dont even know if it is the correct script function for it.

But here's the full code. For some reason %n dosent work and just prints out
PHP Code:

I want it to print out the persons name.

PHP Code:
BCM_Print(id"%n has been given %s $!"property); 
Groven is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 12-28-2013 , 13:24   Re: Print Message
Reply With Quote #2

What game?

Edit: %s is for strings
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 12-28-2013 at 13:25.
wickedd is offline
Groven
AlliedModders Donor
Join Date: Apr 2011
Location: Sweden
Old 12-28-2013 , 14:01   Re: Print Message
Reply With Quote #3

%s works fine but not %n, Is %n for name? Like "Sprite has been given 40"
Groven is offline
neverminde
Senior Member
Join Date: Feb 2011
Location: St.Piter
Old 12-28-2013 , 15:31   Re: Print Message
Reply With Quote #4

Quote:
Originally Posted by Groven View Post
%s works fine but not %n, Is %n for name? Like "Sprite has been given 40"
never seen before this qualifier. seems this stuff dont work in pawn.
Look at this c++ code

#include <stdio.h>
int main(void)
{
int count;
printf ("this%n is a test\n", &count);
printf ("%d", count);
return 0;
}
print "this is a test" after "4". Do you really need this ?

Last edited by neverminde; 12-28-2013 at 15:31.
neverminde is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-28-2013 , 15:36   Re: Print Message
Reply With Quote #5

Quote:
Originally Posted by Groven View Post
Is %n for name?
. . . where did you get this idea? If it is posted here somewhere then it needs to be removed.
__________________

Last edited by fysiks; 12-28-2013 at 15:38.
fysiks is offline
Groven
AlliedModders Donor
Join Date: Apr 2011
Location: Sweden
Old 12-29-2013 , 05:26   Re: Print Message
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
. . . where did you get this idea? If it is posted here somewhere then it needs to be removed.
I asked a random person but it seems he's wrong aswell hehe . But how do I make so the player names print?
Groven is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 12-29-2013 , 06:04   Re: Print Message
Reply With Quote #7

Code:
new szName[ 32 ] get_user_name( id, szName, charsmax( szName ) ) client_print( id, print_chat, "Your name is %s", szName )
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
Groven
AlliedModders Donor
Join Date: Apr 2011
Location: Sweden
Old 12-29-2013 , 06:49   Re: Print Message
Reply With Quote #8

Thank you. will try that.
Groven is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-03-2014 , 12:15   Re: Print Message
Reply With Quote #9

%n only works for SourceMod, not AMXX
__________________
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
Reply


Thread Tools
Display Modes

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 12:33.


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