Raised This Month: $ Target: $400
 0% 

[ Solved ] My plugin bug (duel)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-28-2012 , 08:28   [ Solved ] My plugin bug (duel)
Reply With Quote #1

Hello,

I've a problem with my code.
It's this code :

Spoiler


So i've got a lots of bug.

Like this : ( I've a screen )

1) First bug :

It's not the name of the player but number. Always the same (91 and 65) ... WHy i dont know...


2) Second problem :
And an other problems : ( A screen too )


So ... :S

Thanks all in advance

Ps: If someone say : My code is not optimized. It's not realy a problem now.
After yes but now i just want a code wich works good
__________________
Pawn ? Useless

Last edited by Aooka; 06-30-2012 at 12:25. Reason: added spoiler tags to the long code
Aooka is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-28-2012 , 08:30   Re: [ Request ] My plugin bug (duel)
Reply With Quote #2

Player names are strings, so you should use %s. %d is for integer numbers(like %i).
__________________
<VeCo> is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-28-2012 , 08:32   Re: [ Request ] My plugin bug (duel)
Reply With Quote #3

Oh yes lol.
a problem in less.
Thanks a lots VeCo
__________________
Pawn ? Useless
Aooka is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-28-2012 , 08:32   Re: [ Request ] My plugin bug (duel)
Reply With Quote #4

Because you do not reset the glow anywhere back to normal.
Backstabnoob is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-28-2012 , 08:34   Re: [ Request ] My plugin bug (duel)
Reply With Quote #5

You use %d (decimal) instead of %s (string).

EDIT: Ninja'd.
__________________

Last edited by Arkshine; 06-28-2012 at 08:34.
Arkshine is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-28-2012 , 08:37   Re: [ Request ] My plugin bug (duel)
Reply With Quote #6

Okay i do that

Thanks all i edit it !
__________________
Pawn ? Useless

Last edited by Aooka; 06-28-2012 at 10:50.
Aooka is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-28-2012 , 10:48   Re: [ Request ] My plugin bug (duel)
Reply With Quote #7

So summarize I still have to do :

- Check why only knife duel is running. So other duel do not work. Always a knife duel.
Please it's very important

And :

- Removing the glow with this function :
Code:
set_user_rendering( id , kRenderFxGlowShell , 0 , 0 , 0 , kRenderNormal , 25 );
I set it in the event new round (HLTV) function, but i want to set it directly when a player win the duel.

Thank you in advance and have a nice day all
__________________
Pawn ? Useless

Last edited by Aooka; 06-28-2012 at 10:49.
Aooka is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 06-28-2012 , 11:07   Re: [ Request ] My plugin bug (duel)
Reply With Quote #8

Why was it necessary to double post? Your question is not any more important than anyone elses - use the edit button.
HLTV event does not send a player index. It is also called before players spawn, therefore you should hook player spawn and then reset their standard rendering there.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-28-2012 , 11:18   Re: [ Request ] My plugin bug (duel)
Reply With Quote #9

No really i don't say "My question is more important than anyone elses".
Sorry for the double post. The next time i'll use edit button.

Hum yes i do that now. Thanks a lot.

So now it remains the most complex !
__________________
Pawn ? Useless
Aooka is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 06-28-2012 , 16:58   Re: [ Request ] My plugin bug (duel)
Reply With Quote #10

PHP Code:
enum _DUEL_TYPE {
     
DUEL_NONE = -,
     
DUEL_KNIFE ,
     
DUEL_DEAGLE ,
     
DUEL_SCOUT ,
     
DUEL_AWP ,
     
DUEL_HEGRENADE ,
     
DUEL_M3 ,
     
DUEL_M4A1 ,
     
DUEL_AK47 ,
     
DUEL_M249 
}; 
Is the same as
PHP Code:
enum _DUEL_TYPE {
     
DUEL_NONE = -,
     
DUEL_KNIFE ,
     
DUEL_DEAGLE ,
     
DUEL_SCOUT ,
     
DUEL_AWP ,
     
DUEL_HEGRENADE ,
     
DUEL_M3 ,
     
DUEL_M4A1 ,
     
DUEL_AK47 ,
     
DUEL_M249
 
}; 
And you can optimize it reading about multidimenciolal array constants & loops.
It's just a comment.
__________________

Last edited by Neeeeeeeeeel.-; 06-28-2012 at 17:02.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
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 06:05.


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