![]() |
Two questions!
HELP!
I'm trying to add a command which removes the victims lightsaber. My first question is how can I make it so that once the command has been called that player cannot use their Saber at all afterwards until it's been reversed. My current code: Code:
if(victim->client->ps.weapon == WP_SABER)Lastly when compiling I get this error: Code:
error C2143: syntax error : missing ')' before 'type'Code:
victimnum = ClientNumberFromString( gentity_t *victim, arg); //Victims Client Number, the name is from the given arguments |
I have fixed the second problem but the first one still stands. the Saber is taken away but is immediatly gained again. How can I stop this?
|
Code:
victimnum = ClientNumberFromString( victim, arg); //Victims Client Number, the name is from the given arguments |
Yeah I fixed that problem. But what about the first one?
|
show the whole cmd please would help.
|
It's probably a bit bloated and some things could be done more effectivly because I'm new to this but here it is.
Code:
void Cmd_XtraModTakeSaber_f(gentity_t *taker) |
to make it less bloated and work a little bit better:
Code:
#define AP(x) trap_SendServerCommand(-1, x) // Print to all |
Thank you very much. I'm nowe trying to do teleportation. I'm basically making the players origin the same as (Slightly Offsetted) the target players. Is this the right way of doing it? Because it won't let me assign my modifed vector to ent->client->ps.origin.
|
uhm so you would like to teleport a player near the other?
do this: TeleportPlayer( sendingplayer, toplayer->client->ps.origin, not sure what angles you want though... its vec3_t ); |
Yes thanks. It works nicely. Now yet another query :-D I have a kick function that works OK but it's messy. It uses trap_DropClient() which gives a nasty looking dialog box when it's called saying Server Disconnected -9999. Which isn't that useful to the user. I couldn't find in the SDK the code for the normal kick function. I want to know how to display my own personalised message in that dialog that appears.
|
hmm try this:
Code:
// Kicks a player |
Thanks. You're very helpful. How long have you been modding?
|
Don't worry I'm an idiot :smash:
|
quite a while :king1:
|
OI! =D Yeah well I'm getting better slowly... and don't worry I'll be crediting you in my Mod.
|
Wow! I'm rather pleased with myself! I managed to create Partial name detection all on my own! :D Weee!
BOO OK I didn't... no Matter what name I enter it always kills me :S. Anyhelp? Code:
int G_ClientNumberFromPartialName(char *partial) |
| All times are GMT -4. The time now is 12:50 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.