Raised This Month: $ Target: $400
 0% 

Just a small issue...


Post New Thread Reply   
 
Thread Tools Display Modes
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 04-11-2007 , 22:48   Re: Just a small issue...
Reply With Quote #11

Quote:
Originally Posted by Theshooter7 View Post
I can't get the XP numbers to show properly, they just show up as 0's. Should I post the .sma file for this one?
Yeah would be useful...
Deviance is offline
Theshooter7
Junior Member
Join Date: Apr 2007
Old 04-11-2007 , 22:53   Re: Just a small issue...
Reply With Quote #12

Alrighty. Please excuse the extreme disorganization; It is a practice plugin and my first big dive into AMX scripting.
Attached Files
File Type: sma Get Plugin or Get Source (Untitled.sma - 433 views - 664 Bytes)
Theshooter7 is offline
Old 04-11-2007, 23:18
Deviance
This message has been deleted by Deviance. Reason: nvm
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-12-2007 , 09:05   Re: Just a small issue...
Reply With Quote #13

I think you posted the wrong sma...0o
__________________
regalis is offline
Theshooter7
Junior Member
Join Date: Apr 2007
Old 04-12-2007 , 11:33   Re: Just a small issue...
Reply With Quote #14

Yes, apparently I did. Sorry for any inconvenience.
Attached Files
File Type: sma Get Plugin or Get Source (Untitled.sma - 440 views - 10.0 KB)
Theshooter7 is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 04-12-2007 , 15:21   Re: Just a small issue...
Reply With Quote #15

Just steal my code (That i don't even think works) D:
You could of atleast let me fix it before you went off using it, without credit..

(And wtf, get on msn faggot)
__________________
Oh yeah

Last edited by Drak; 04-12-2007 at 15:36.
Drak is offline
Send a message via MSN to Drak
Theshooter7
Junior Member
Join Date: Apr 2007
Old 04-12-2007 , 17:56   Re: Just a small issue...
Reply With Quote #16

What are you talking about? I wrote most of this from scratch.

Also, can't get on MSN, visiting mother's house. :/
Theshooter7 is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 04-12-2007 , 18:11   Re: Just a small issue...
Reply With Quote #17

No you didn't. Plus, "remove_ent_by_model" I try'ed todo. Which you stated that it never worked :/
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Theshooter7
Junior Member
Join Date: Apr 2007
Old 04-12-2007 , 20:35   Re: Just a small issue...
Reply With Quote #18

Quote:
Originally Posted by SixTwin View Post
No you didn't. Plus, "remove_ent_by_model" I try'ed todo. Which you stated that it never worked :/
Yes I did. The only thing I didn't write out or modify on my own is that remove_ent_by_model function, which yes it didn't work, but I managed to edit the map's entities anyways using BSPEdit.

Anywho, are you going to sit there and keep arguing are you going to fix it, mister "AMX is so easy"
Theshooter7 is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 04-12-2007 , 20:51   Re: Just a small issue...
Reply With Quote #19

Shut it, both of you. While this is an open source community, you cannot "steal" code with giving proper credit. This can be considered the lowest form of noobery.

Stealing code can include simple code such as this (found in the plugin on line #221, which I know this was taken from someone [can't remember who, I believe Kr0t@l])
Code:
public sqrt(num) {     new div = num     new result = 1     while (div > result) { // end when div == result, or just below         div = (div + result) / 2 // take mean value as new divisor         result = num / div     }     return div }

Problem code:
Code:
public setup() {     set_task(0.1,"playerhud",0,"",0,"b")     set_task(0.1,"playerhud2",0,"",0,"b") } public playerhud(id) {     set_hudmessage(255, 0, 0, 1.0, 0.4, 0, 6.0, 12.0)     show_hudmessage(id, "Level: %d ^nXP: %d / %d",LVL[id],XP[id],XP2LVL[id]) }

The reason why this isn't working, is because the var id is not a the index of a player, but the internal ID of the task. Just show the hud message through client_PreThink() or something like that. Or, while this is extremely inefficient, create a player loop within the task function.

Also,
Code:
stock remove_ent_by_model(model[]) {     if(equali(model,""))         return PLUGIN_HANDLED         new ent = find_ent_by_model(-1,"ts_model",model)     if(is_valid_ent(ent)) {         remove_entity(ent)         server_print("[AMXX] ENTITY REMOVED - MODEL: %s",model)     }     else server_print("[AMXX] ENTITY NOT REMOVED - MODEL: %s",model)         return PLUGIN_CONTINUE; }

You should do this in a while loop, to ensure that all entities with that model are deleted.
Code:
stock remove_ent_by_model(model[]) {     if(equali(model,""))         return PLUGIN_HANDLED         new ent     while ((ent = find_ent_by_model(-1,"ts_model",model)))     {                   if(is_valid_ent(ent)) {             remove_entity(ent)             server_print("[AMXX] ENTITY REMOVED - MODEL: %s",model)         }         else server_print("[AMXX] ENTITY NOT REMOVED - MODEL: %s",model)     }         return PLUGIN_CONTINUE; }

All code not compiled nor tested.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred

Last edited by Zenith77; 04-12-2007 at 20:59.
Zenith77 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 06:44.


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