[Half-Life AMXX] / compiled / climb_2_0_a2 / amxmodx / scripting / include / cstrike2.inc Repository:
ViewVC logotype

Annotation of /compiled/climb_2_0_a2/amxmodx/scripting/include/cstrike2.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : ian 1 /*Cstrike Stocks 2
2 :     * Version 0.1.2
3 :     *
4 :     * by Don Juan-jello
5 :     * www.jello-net.com
6 :     *
7 :     * This file is provided as is (no warranties).
8 :     */
9 :    
10 :     #if defined _cstrike2_included
11 :     #endinput
12 :     #endif
13 :     #define _cstrike2_included
14 :    
15 :     //Set whether play has shield
16 :     stock cs_set_user_shield(id,onoff=1){
17 :     if(onoff)set_offset_int(id,510,(1<<24))
18 :     else set_offset_int(id,510,0)
19 :     return 1
20 :     }
21 :    
22 :     // Set Score Attribute
23 :     // 0 nothing
24 :     // 1 dead
25 :     // 2 bomb
26 :     // 4 vip
27 :     stock cs_set_user_scoreattrib(id,attrib=0){
28 :     message_begin(2,get_user_msgid("ScoreAttrib"),{0,0,0},0)
29 :     write_byte(id)
30 :     write_byte(attrib)
31 :     message_end()
32 :     }
33 :    
34 :     // Radio and chat strings can have control characters embedded to set colors. For the control characters to be used, one must be at the start of the string.
35 :     // The control characters can be copied and pasted in notepad.
36 :     // 0x02 (STX) - Use team color up to the end of the player name. This only works at the start of the string, and precludes using the other control characters.
37 :     // 0x03 (ETX) - Use team color from this point forward
38 :     // 0x04 (EOT) - Use location color from this point forward
39 :     // 0x01 (SOH) - Use normal color from this point forward
40 :     // Sample string "^x03Team colored text ^x01Normal color"
41 :     public saytext(sndr,rcvr,txt[]){
42 :     message_begin(1,get_user_msgid("SayText"),{0,0,0},rcvr)
43 :     write_byte(sndr)
44 :     write_string(txt)
45 :     message_end()
46 :     return PLUGIN_CONTINUE
47 :     }
48 :     public saytextall(sndr,txt[]){
49 :     message_begin(2,get_user_msgid("SayText"),{0,0,0},0)
50 :     write_byte(sndr)
51 :     write_string(txt)
52 :     message_end()
53 :     return PLUGIN_CONTINUE
54 :     }
55 :     //Be sure to pass this function the text without any color codes in it.
56 :     stock saytextlog(sndr,txt[],saytype[]="say"){
57 :     if(sndr>0){
58 :     new name[32],steam[20],team[10]
59 :     get_user_name(sndr,name,31)
60 :     get_user_authid(sndr,steam,19)
61 :     get_user_team(sndr,team,9)
62 :     log_message("^"%s<%d><%s><%s>^" %s ^"%s^"%s",name,get_user_userid(sndr),steam,team,saytype,txt,is_user_alive(sndr)?"":" (dead)")
63 :     }
64 :     else log_message("Server say ^"%s^"",txt)
65 :     return PLUGIN_CONTINUE
66 :     }
67 :     stock weaponstrip(id,noknife=0){
68 :     new ent=create_entity("player_weaponstrip")
69 :     DispatchSpawn(ent)
70 :     entity_use(ent,id)
71 :     if(!noknife)give_item(id,"weapon_knife")
72 :     remove_entity(ent)
73 :     set_offset_int(id,116,0)
74 :     return 1
75 :     }

Contact
ViewVC Help
Powered by ViewVC 1.0.4