Raised This Month: $32 Target: $400
 8% 

[ H3LP ] func_rotating


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-17-2018 , 15:29   [ H3LP ] func_rotating
Reply With Quote #1

Hello. I wrote a script that creates a func_rotating entity and assigns the map model to it. It works ok, but I don't know how to change it's movement angles. Any ideas? Thanks !
DarthMan is offline
polimpo4
Member
Join Date: Jan 2017
Old 04-18-2018 , 14:23   Re: [ H3LP ] func_rotating
Reply With Quote #2

Post Sma Code
polimpo4 is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-18-2018 , 16:17   Re: [ H3LP ] func_rotating
Reply With Quote #3

Quote:
Originally Posted by polimpo4 View Post
Post Sma Code
Here is what I currently made.

Code:
public cmd_CreateWorld(iID, iLevel, iCid) {     if(!cmd_access(iID, iLevel, iCid, 8))         return PLUGIN_HANDLED;         if(!isEntMod(iID))         return PLUGIN_HANDLED;         if(!UserHasEntModAccess(iID, 3))         return PLUGIN_HANDLED;         new Float: fOrigin[VEC_SIZE], Float: fAngles[VEC_SIZE];         for(new i = 0; i < VEC_SIZE; i++)     {         fAngles[i] = read_argv_float(i + 1);                 if(fAngles[i] < 0.0 || fAngles[i] > 360.0)         {             console_print(iID, "Angles must be between 0 and 360");             return PLUGIN_HANDLED;         }     }         for(new i = 0; i < VEC_SIZE; i++)         fOrigin[i] = read_argv_float(i + 4);         new szModel[NAME_LEN + VEC_SIZE * 2];         new iFlags = 1 + 64 + 8 + 4;         new iSpeed = read_argv_int(7);         if(iSpeed <= 0)     {         console_print(iID, "Speed set to 100.");         iSpeed = 100;     }         new iReverse = read_argv_int(8);         if(iReverse == 1)         iFlags += 2;         if(iReverse < 0 || iReverse > 1)     {         console_print(iID, "Must be 0 or 1.");         return PLUGIN_HANDLED;     }         new iWorld = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_rotating"));         get_mapname(szModel, charsmax(szModel));     format(szModel, charsmax(szModel), "maps/%s.bsp", szModel);     FM_DispatchKeyValue(iWorld, "model", szModel);         FM_DispatchKeyValue_Vector(iWorld, "origin", fOrigin);         FM_DispatchKeyValue_Vector(iWorld, "spawnorigin", fOrigin);         FM_DispatchKeyValue_Vector(iWorld, "angles", fAngles);         FM_DispatchKeyValue_Int(iWorld, "speed", iSpeed);         FM_DispatchKeyValue_Int(iWorld, "distance", 90);         FM_DispatchKeyValue_Int(iWorld, "fanfriction", 50);         FM_DispatchKeyValue_Int(iWorld, "spawnflags", iFlags);         dllfunc(DLLFunc_Spawn, iWorld);         engfunc(EngFunc_SetOrigin, iWorld, fOrigin);         set_pev_string(iWorld, pev_classname, engfunc(EngFunc_AllocString, g_szWorldClass));         if(!g_bIsNew[iWorld])         g_bIsNew[iWorld] = true;         FVecIVec(fOrigin, g_iOrigin[iWorld]);         return PLUGIN_HANDLED; }

Last edited by DarthMan; 04-18-2018 at 17:34.
DarthMan is offline
Reply



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 01:59.


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