Raised This Month: $61 Target: $400
 15% 

Plugin PrintToChat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Laser32
AlliedModders Donor
Join Date: Sep 2006
Location: Germany (Schwerin)
Old 09-04-2015 , 08:02   Plugin PrintToChat
Reply With Quote #1

Hi Guys
I have here a plugin the medal awards from a number of points.
Unfortunately, the issue does not chat. if you win a medal is to come in chat "You've qualified for the Bronze Medal"
but it comes no message

Quote:
EmitSoundToClient(i, SOUND_FANFARE);
PrintToChat(i, "\x01 You've qualified for the \x05bronze\x01 medal!");
g_nPlayerData[i][g_bReached][BRONZE_MEDAL] = true;
}else if(!g_nPlayerData[i][g_bReached][SILVER_MEDAL] && GetEntProp(GetPlayerResourceEntity(), Prop_Send, "m_iScore", _, i) >= GetConVarInt(g_hSilver))
{
EmitSoundToClient(i, SOUND_FANFARE);
PrintToChat(i, "\x01 You've qualified for the \x04silver\x01 medal!");
g_nPlayerData[i][g_bReached][SILVER_MEDAL] = true;
}else if(GetEntProp(GetPlayerResourceEntity(), Prop_Send, "m_iScore", _, i) >= GetConVarInt(g_hGold))

hope can help me ... sorry my english is bad

Last edited by Laser32; 09-04-2015 at 08:11.
Laser32 is offline
DJ Data
SourceMod Donor
Join Date: Dec 2012
Location: Switzerland
Old 09-04-2015 , 08:23   Re: Plugin PrintToChat
Reply With Quote #2

To make it easier to read:
PHP Code:
//else if(blablabla)
{
    
EmitSoundToClient(iSOUND_FANFARE);
    
PrintToChat(i"\x01 You've qualified for the \x05bronze\x01 medal!");
    
g_nPlayerData[i][g_bReached][BRONZE_MEDAL] = true;
}
else if(!
g_nPlayerData[i][g_bReached][SILVER_MEDAL] && GetEntProp(GetPlayerResourceEntity(), Prop_Send"m_iScore"_i) >= GetConVarInt(g_hSilver))
{
    
EmitSoundToClient(iSOUND_FANFARE);
    
PrintToChat(i"\x01 You've qualified for the \x04silver\x01 medal!");
    
g_nPlayerData[i][g_bReached][SILVER_MEDAL] = true;
}
else if(
GetEntProp(GetPlayerResourceEntity(), Prop_Send"m_iScore"_i) >= GetConVarInt(g_hGold)){


Could you give us the whole function's code? The snippet makes it hard to see where "i" is coming from.
__________________
SourcePawn Coding Level: Novice

Last edited by DJ Data; 09-04-2015 at 08:24.
DJ Data is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 09-04-2015 , 09:10   Re: Plugin PrintToChat
Reply With Quote #3

Any error log?
KissLick is offline
Laser32
AlliedModders Donor
Join Date: Sep 2006
Location: Germany (Schwerin)
Old 09-04-2015 , 10:07   Re: Plugin PrintToChat
Reply With Quote #4

no error log

Last edited by Laser32; 09-04-2015 at 10:09.
Laser32 is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 09-04-2015 , 10:19   Re: Plugin PrintToChat
Reply With Quote #5

Quote:
Originally Posted by Laser32 View Post
no error log
in that case ->
Quote:
Originally Posted by DJ Data View Post
Could you give us the whole function's code? The snippet makes it hard to see where "i" is coming from.
KissLick is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 09-04-2015 , 13:34   Re: Plugin PrintToChat
Reply With Quote #6

Laser32, player got a sound?
PHP Code:
EmitSoundToClient(iSOUND_FANFARE); 
Kailo is offline
Laser32
AlliedModders Donor
Join Date: Sep 2006
Location: Germany (Schwerin)
Old 09-05-2015 , 10:00   Re: Plugin PrintToChat
Reply With Quote #7

Quote:
Originally Posted by Kailo View Post
Laser32, player got a sound?
PHP Code:
EmitSoundToClient(iSOUND_FANFARE); 
no sound
Laser32 is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 09-05-2015 , 10:46   Re: Plugin PrintToChat
Reply With Quote #8

No code, no help here..................... (I know three dots are often enough, but not here)
KissLick is offline
Laser32
AlliedModders Donor
Join Date: Sep 2006
Location: Germany (Schwerin)
Old 09-07-2015 , 03:53   Re: Plugin PrintToChat
Reply With Quote #9

pls closed

Last edited by Laser32; 09-07-2015 at 10:12.
Laser32 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 15:23.


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