Raised This Month: $ Target: $400
 0% 

Paid request


Post New Thread Reply   
 
Thread Tools Display Modes
WolfGang
BANNED
Join Date: Oct 2010
Old 03-16-2013 , 22:00   Re: Paid request
Reply With Quote #11

After the change, Points isn't given and message isn't showing. Also changed the translation file to
PHP Code:
"Killed SI"
    
{
        
"#format"    "{1:3.2f}"
        "en"        "Killed Special Infected +{1} points"
    

PHP Code:
points[attacker] += (GetConVarFloat(sipoints) * GetConVarFloat(g_SurvivorMultiplier));  
if(
notifyPrintToChat(attacker"%s %T"MSGTAG"Killed SI"LANG_SERVERGetConVarFloat(sipoints) * GetConVarFloat(g_SurvivorMultiplier)); 

Last edited by WolfGang; 03-17-2013 at 14:49.
WolfGang is offline
WolfGang
BANNED
Join Date: Oct 2010
Old 03-19-2013 , 22:46   Re: Paid request
Reply With Quote #12

Quote:
Originally Posted by Skyy View Post
I've added assist points; default at 2.
Edit: corrected.
You've said you corrected it? Have you tried playing with it see if work? cause it doesn't seem to work for me. All I'm asking is for this to work and work flawless.

Thanks,
WolfGang
WolfGang is offline
Skyy
AlliedModders Donor
Join Date: Jan 2010
Location: Toronto, Canada
Old 03-20-2013 , 04:42   Re: Paid request
Reply With Quote #13

Quote:
Originally Posted by Skyy View Post
Edit:
All players who deal damage to the infected player receive assist points no matter their contribution; This version doesn't weigh the assist points earned based on the contribution of the player. Instead, all players earn a flat amount. The player who earns the kill points also receives the assist points.

Yes, I've tried playing it to see if it works. I attached a new version of the file to include the binaries in case you were unable to compile it.
You may want to download it and upload the compiled binaries that are included if you're having problems compile it yourself. It works flawlessly for me, so you may want to just try that.

Last edited by Skyy; 03-20-2013 at 05:07.
Skyy is offline
WolfGang
BANNED
Join Date: Oct 2010
Old 03-22-2013 , 00:17   Re: Paid request
Reply With Quote #14

Quote:
Originally Posted by Skyy View Post
Yes, I've tried playing it to see if it works. I attached a new version of the file to include the binaries in case you were unable to compile it.
You may want to download it and upload the compiled binaries that are included if you're having problems compile it yourself. It works flawlessly for me, so you may want to just try that.
Thanks this worked. But it'll be better if the attacker (who killed the SI) receive the SI kill points instead of both. Possible?

Does this code goes for all players?
PHP Code:
for (new 1<= MaxClientsi++) 
meaning that if players who didnt do damage to the si still receive points?
WolfGang is offline
Skyy
AlliedModders Donor
Join Date: Jan 2010
Location: Toronto, Canada
Old 03-22-2013 , 00:30   Re: Paid request
Reply With Quote #15

no. that simply says the for loop runs through all valid client ids. it's the players who meet the statement within its argument that receive the points.
the best way to understand how loops and arguments work is to read up on basic programming.

Last edited by Skyy; 03-22-2013 at 00:30.
Skyy is offline
WolfGang
BANNED
Join Date: Oct 2010
Old 03-22-2013 , 23:48   Re: Paid request
Reply With Quote #16

Quote:
PHP Code:
new Handle:g_SurvivorMultiplier INVALID_HANDLE;
new 
Float:points[MAXPLAYERS 1];
points[attacker] += (GetConVarFloat(sipoints) * GetConVarFloat(g_SurvivorMultiplier)); 
This worked, it prints the right value into chat, but gives different points awarded(i.e Kill SI +1.09 points, (In Menu)109235474934 Points left) What's wrong?

Last edited by WolfGang; 03-22-2013 at 23:48.
WolfGang is offline
Skyy
AlliedModders Donor
Join Date: Jan 2010
Location: Toronto, Canada
Old 03-23-2013 , 04:25   Re: Paid request
Reply With Quote #17

because your menu shows ints, not floats.
change from %d to %3.2f

Last edited by Skyy; 03-23-2013 at 04:26.
Skyy is offline
WolfGang
BANNED
Join Date: Oct 2010
Old 03-23-2013 , 13:16   Re: Paid request
Reply With Quote #18

Quote:
Originally Posted by Skyy View Post
because your menu shows ints, not floats.
change from %d to %3.2f
And one last thing, how do i show the damage? And take the amount of damage client did and multiply it by the g_AssistPoints?
WolfGang is offline
Skyy
AlliedModders Donor
Join Date: Jan 2010
Location: Toronto, Canada
Old 03-23-2013 , 20:37   Re: Paid request
Reply With Quote #19

g_Damage[victim][attacker] += GetEventInt(event, "damage");
PrintToChat(client, "Damage: %d", g_Damage[victim][attacker]); No translation
PrintToChat(client, "%T", "Damage", client, g_Damage[victim][attacker]); Translation

g_Damage[victim][attacker] *= g_AssistPoints[victim][attacker];
Skyy is offline
WolfGang
BANNED
Join Date: Oct 2010
Old 03-23-2013 , 21:46   Re: Paid request
Reply With Quote #20

How can i fit that into this line?
PHP Code:
if (client && GetClientTeam(client) == && IsAllowedGameMode() && GetConVarInt(Enable) == 1)
    {
        new 
bool:notify GetConVarBool(Notifications);
        for (new 
1<= MaxClientsi++)
        {
            if (
IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) == && g_Assist[client][i])
            {
                
g_Assist[client][i] = false;
                
points[i] += GetConVarInt(g_AssistPoints);
                if(
notifyPrintToChat(i"%s %T"MSGTAG"Assist Points"LANG_SERVERGetConVarInt(g_AssistPoints));
            }
        }
    } 
WolfGang 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 07:56.


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