diff --git a/config/scripts.cfg b/config/scripts.cfg index 45faec78..154a14e5 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -1,9 +1,50 @@ // CubeScript placed in this file is automatically executed on each startup. -// editent command +// "editent" command +// Note: The editent command can NOT define rotation/yaw inside the command! +// ... however, the current yaw of the player will define the rotation/yaw when using the command! alias editent [ alias enttype (getenttype) - if (! (strcmp enttype "")) [ + if (= (strcmp (getenttype) "mapmodel") 1) [ + saycommand "/entset" $enttype (getentattr 1) (getentattr 2) (getentattr 3) + ] + if (= (strcmp (getenttype) "light") 1) [ + saycommand "/entset" $enttype (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3) + ] + if (= (strcmp (getenttype) "ammobox") 1) [ + saycommand "/entset" $enttype (getentattr 0) + ] + if (= (strcmp (getenttype) "sound") 1) [ + saycommand "/entset" $enttype (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3) + ] + if (= (strcmp (getenttype) "health") 1) [ + saycommand "/entset" $enttype (getentattr 0) + ] + if (= (strcmp (getenttype) "playerstart") 1) [ + saycommand "/entset" $enttype (getentattr 1) + ] + if (= (strcmp (getenttype) "pistol") 1) [ + saycommand "/entset" $enttype (getentattr 0) + ] + if (= (strcmp (getenttype) "grenades") 1) [ + saycommand "/entset" $enttype (getentattr 0) + ] + if (= (strcmp (getenttype) "sound") 1) [ + saycommand "/entset" $enttype (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3) + ] + if (= (strcmp (getenttype) "armour") 1) [ + saycommand "/entset" $enttype (getentattr 0) + ] + if (= (strcmp (getenttype) "akimbo") 1) [ + saycommand "/entset" $enttype (getentattr 0) + ] + if (= (strcmp (getenttype) "ladder") 1) [ + saycommand "/entset" $enttype (getentattr 0) + ] + if (= (strcmp (getenttype) "ctf-flag") 1) [ + saycommand "/entset" $enttype (getentattr 1) + ] + if (= (strcmp (getenttype) "clip") 1) [ saycommand "/entset" $enttype (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3) ] ] @@ -19,7 +60,7 @@ loop i (listlen $mapcommands) [ complete demo "demos" dmo -alias entcomplete [listcomplete $arg1 "light playerstart pistol ammobox grenades health armour akimbo mapmodel trigger ladder ctf-flag sound clip"] +alias entcomplete [listcomplete $arg1 "light playerstart pistol ammobox grenades health armour akimbo mapmodel ladder ctf-flag sound clip"] entcomplete newent entcomplete clearents entcomplete closestenttype