Raised This Month: $ Target: $400
 0% 

Superhero Mod Change/Modification


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Trumpet_Rhapsody
Junior Member
Join Date: Jun 2004
Old 06-19-2004 , 03:45   Superhero Mod Change/Modification
Reply With Quote #1

I've been trying to modify the Daredevil character's ESP rings to show as red for Terrorists, and Blue for Counter-Terrorists (and down the road have cvars to show only your team, or the enemy). Since I know basically none of the "Small" scripting language, I've been getting code from other superheros. I've gotten most of the team detection and stuff from Xavier. Like I say I know pretty much nothing about Small scripting except what I've learned by reading plugins.

I've decided to post the code that I've modified, so if you don't want to d/l it you can just look to see the changes:
Code:
public daredevil_esp( id ) {    new players[SH_MAXSLOTS];    new c;    new vec1[3];    get_players(players,c,"a");    for(new i = 0; i < c; i++)    {      if(players[i]==id) continue;      get_user_origin(players[i],vec1,0);      if ( !is_user_alive(id) ) return      message_begin(MSG_ONE,SVC_TEMPENTITY,vec1,id)      write_byte( 21 );        write_coord(vec1[0]);        write_coord(vec1[1]);        write_coord(vec1[2] + 16);        write_coord(vec1[0]);        write_coord(vec1[1]);        write_coord(vec1[2] + 768 ) // test get_cvar_num("daredevel_radius") );  //1936      write_short( gSpriteWhite );        write_byte( 0 ); // startframe      write_byte( 1 ); // framerate      write_byte( 6 ); // 3 life 2      write_byte( 8 ); // width 16      write_byte( 1 ); // noise      if ( get_user_team(id) == 1) {           write_byte( 255 ); // r           write_byte( 100 ); // g           write_byte( 100 ); // b      }      else if ( get_user_team(id) == 2) {           write_byte( 100 ); // r           write_byte( 100 ); // g           write_byte( 255 ); // b      }      write_byte( get_cvar_num("daredevil_bright") ); //brightness      write_byte( 0 ); // speed      message_end();    } }
Attached Files
File Type: sma Get Plugin or Get Source (sh_daredevil.sma - 912 views - 3.9 KB)
File Type: sma Get Plugin or Get Source (sh_daredevil.sma - 833 views - 3.7 KB)
__________________
Server: MasterChiefs.hopto.org
-AMX Mod X - Plenty of Plugins
-MetaMod 1.17.1
Trumpet_Rhapsody is offline
Send a message via ICQ to Trumpet_Rhapsody Send a message via AIM to Trumpet_Rhapsody
 



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 14:37.


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