Trouble with ts_givepwup
I'm trying to make a plugin for TS while gives a random powerup to each player on spawn. However, I hit the wall when I couldn't get the ts_givepwup function to work. I created this very simple plugin to test it out, but to no avail.
Code:
It compiles fine, and when I try "say /give" on my server, the plugin obviously catches it, since it doesn't display on the screen. However, nothing happens. I've tested it with other powerups, and just using the numbers etc, but nothing works. If anyone could tell me how I can get this function working, I would be most appreciative Thanks in advance |
From tsx.inc:
Code:
There may also have to be a very small (ie: 0.1 second) delay before giving it after you create it. |
okay, I added some code to create the powerup, but still nothing happens.
Code:
Is there something else I'm missing here? |
Yes. Use TSPWUP_SUPERJUMP, not TSITEM_SUPERJUMP.
|
Sorry, I was testing before, and forgot to change it back. :? It still doesn't work with TSPWUP_SUPERJUMP. Is there anything wrong with the changes I made to create the powerup?
|
make sure sv_cheat is set to 1 or you cannot give out powerups
i will figure out how to include that in your plugin but i have no time now |
i saw someone do it without sv_cehats 1... they wouldnt let me look at their code though...
also, Knare, are you aware that your signature in binary translates to k;˜\™ In ASCII format? 0100101101101110011000010111001001100101 is binary for Knare |
Thanks guys, it works fine now. I added a little function to slay people using cheats, so my server doesn't get grenade spammed or anything. :P
|
... isnt that a little harsh? why not just disable the powerup 1 2 3 4 commands...
|
Is there actually a legitimate use for the powerup command? If there is, I will modify it.
EDIT: Okay, it seems I was a little premature in declaring this working. It does work, but only on the map ts_dojo. I can actually see the powerup spawn in the middle of the dojo, and then disappear a second later when it is given to the player. Anyone have any thoughts as to why it only works on this map? |
| All times are GMT -4. The time now is 19:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.