Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 104 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Soldier of Fortune
Category: SoFII Mapping
Mapping, modeling, scripting, skinning and all forms of editing for the game Soldier of Fortune II
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: CODE DUMP WOO
RyanX~rb
General Member
Since: Dec 23, 2006
Posts: 625
Last: Dec 23, 2006
[view latest posts]
Level 6
Category: SoFII Mapping
Posted: Wednesday, Oct. 22, 2003 01:17 pm
Ok you seem to know your stuff, how bout headshots and commands like /adm runover clientid
Share |
RyanX~rb
General Member
Since: Dec 23, 2006
Posts: 625
Last: Dec 23, 2006
[view latest posts]
Level 6
Category: SoFII Mapping
Posted: Thursday, Oct. 23, 2003 01:34 am
worked out kill prints etc just the sounds i cant get to work. any chance you can post the full code to play a sound from npc file please...
Share |
yewbie~rb
General Member
Since: Dec 23, 2006
Posts: 20
Last: Dec 23, 2006
[view latest posts]
Level 1
Category: SoFII Mapping
Posted: Thursday, Oct. 30, 2003 06:38 am
for ( i = 0 ; i < MAX_CLIENTS ; i++ )
{
ent = g_entities + i;
G_Sound(ent, EV_GLOBAL_SOUND, G_SoundIndex("sound/ambience/generic/alarm05.wav"));
}
Share |
yewbie~rb
General Member
Since: Dec 23, 2006
Posts: 20
Last: Dec 23, 2006
[view latest posts]
Level 1
Category: SoFII Mapping
Posted: Thursday, Oct. 30, 2003 07:06 am
case HL_HEAD:
anim = BOTH_DEATH_HEAD_1 + (rand()%2);
trap_SendServerCommand( -1, va("cp \"*" S_COLOR_RED "HEADSHOT*\n\""));
for ( i = 0 ; i < MAX_CLIENTS ; i++ )
{
ent = g_entities + i;
G_Sound(ent, EV_GLOBAL_SOUND, G_SoundIndex("sound/ambience/generic/alarm05.wav"));
}
break;


for headshots just replace with the one in your player_die function in g_combat.c


and for the run over command you will do the same thing as strike, but make a car sound here is some code for that

//////////////STRIKE COMMAND/////////////////
if (Q_stricmp (command, "strike") == 0)
{
gclient_t *cl;
int clientNum;
char userinfo[MAX_INFO_STRING];
int i;

if ( trap_Argc() < 3 )
{
Com_Printf("Usage:  Strike <clientid>\n");
return;
}



cl = ClientForString2( command2 );
clientNum = cl - level.clients;

if ( level.clients[clientNum].pers.connected != CON_CONNECTED )
{
return;
}

for ( i = 0 ; i < MAX_CLIENTS ; i++ )
{
ent = g_entities + i;
G_Sound(ent, EV_GLOBAL_SOUND, G_SoundIndex("sound/ambience/generic/thunder02.mp3"));
}

ent = g_entities + clientNum;

ent->client->ps.stats[STAT_HEALTH] = ent->health = 0;
player_die (ent, ent, ent, 100000, MOD_TARGET_LASER, HL_NONE, vec3_origin );
ent->client->sess.ghost = qfalse;
trap_SendServerCommand( -1, va("cp \"%s" S_COLOR_WHITE " Just got fried by a Admin.\n\"", ent->client->pers.netname) );
}
Share |
RyanX~rb
General Member
Since: Dec 23, 2006
Posts: 625
Last: Dec 23, 2006
[view latest posts]
Level 6
Category: SoFII Mapping
Posted: Friday, Oct. 31, 2003 01:41 am
wow thx alot dude i was playing the sounds like 25 times LOL so everyone could hear :p Do you know how to make a command to strip a person of there weapons and leave them with knive? i have had trouble with that however i got some good stuff working...

I made a kill counter... so if you get 5+ kills etc..

it will print "Name is owning you noobs\n5 Kills in a row!"

any chance you could help me out on chat tokens? i av quite a few already but i cant get location or current weapons to work if you can help me out that would be great! thx.
Share |
yewbie~rb
General Member
Since: Dec 23, 2006
Posts: 20
Last: Dec 23, 2006
[view latest posts]
Level 1
Category: SoFII Mapping
Posted: Saturday, Nov. 1, 2003 05:04 am
I never really got into chat tokens at all, sorry
Share |
<<{BLS}>>Galphar~rb
General Member
Since: Dec 23, 2006
Posts: 2
Last: Dec 23, 2006
[view latest posts]
Level 0
Category: SoFII Mapping
Posted: Thursday, Nov. 13, 2003 08:48 pm
Great job, yewbie! This is just what i needed to start my own mod. Now just one question, where do i add all the admin commands, g_svcmds.c?
Share |
RyanX~rb
General Member
Since: Dec 23, 2006
Posts: 625
Last: Dec 23, 2006
[view latest posts]
Level 6
Category: SoFII Mapping
Posted: Friday, Nov. 14, 2003 01:05 pm
Thats for console commands from the server.

g_cmds.c
Share |
<<{BLS}>>Galphar~rb
General Member
Since: Dec 23, 2006
Posts: 2
Last: Dec 23, 2006
[view latest posts]
Level 0
Category: SoFII Mapping
Posted: Friday, Nov. 14, 2003 07:39 pm
Thanx Ryanx. I noticed you posted about adding a admin list also, have figured out how to do that yet?
Share |
RyanX~rb
General Member
Since: Dec 23, 2006
Posts: 625
Last: Dec 23, 2006
[view latest posts]
Level 6
Category: SoFII Mapping
Posted: Saturday, Nov. 15, 2003 10:22 am
Yes that is also quite simple.

Open up g_local.h and search for

int score; // total score
int kills; // number of kills

You will need to add a new field for this admin list to work.

int score; // total score
int kills; // number of kills
qboolean admin;

Once that is done on your admin in console command section in g_cmds.c

Put

if (Q_stricmp (cmd, "adm") == 0)
{
if ( level.clients[clientNum].sess.admin == qtrue )
{
Cmd_adm_f (ent);
return;
}
else
{
trap_SendServerCommand( clientNum, va("print \"You do not have access to the admin options!\n\"", cmd ) );
return;
}
}
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Soldier of Fortune : SoFII Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»