AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   /spec /back (https://forums.alliedmods.net/showthread.php?t=147350)

Normis 01-08-2011 08:04

/spec /back
 
Hi everybody

Can everyone give link where I get a /spec /back commands

In server you can write /spec and you will be transfer to spectator

And /back you will be transfer to CT or T

xakintosh 01-08-2011 11:07

Re: /spec /back
 
I'am using this for my kreedz :)
Code:
#include <amxmodx> #include <cstrike> #include <fun> #include <fakemeta> public plugin_init() {     register_plugin("x","x","x")     register_clcmd("say /ct","team_ct")     register_clcmd("say /spec","team_spec") } public team_ct(id) {     new CsTeams:team = cs_get_user_team(id)     if (team == CS_TEAM_CT) {         return PLUGIN_HANDLED         } else {         cs_set_user_team(id,CS_TEAM_CT)           cs_user_spawn(id)         if(is_user_alive(id)) {                 strip_user_weapons(id)             give_item(id,"weapon_knife")               give_item(id,"weapon_usp")               cs_set_user_bpammo(id, CSW_USP, 250)         }     }     return PLUGIN_HANDLED } public team_spec(id) {     new CsTeams:team = cs_get_user_team(id)     if (team == CS_TEAM_SPECTATOR) {         return PLUGIN_HANDLED         } else {         set_pev( id, pev_deadflag, DEAD_DISCARDBODY )         cs_set_user_team(id,CS_TEAM_SPECTATOR,CS_DONTCHANGE)     }     return PLUGIN_HANDLED }

drekes 01-08-2011 14:03

Re: /spec /back
 
@ O.P.
I'm pretty sure this is included in amx_super.

@ xakintosh:
You don't have to cache the value of cs_get_user_team() in the team variable, since it is only called once per function.


All times are GMT -4. The time now is 02:06.

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