Raised This Month: $ Target: $400
 0% 

simple plugin request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
stonedegg
Senior Member
Join Date: Nov 2011
Location: de_dust2
Old 08-13-2013 , 17:15   simple plugin request
Reply With Quote #1

Hello, can someone write me please a simple script which does following:

Command sm_setang to set the angle of a player.
Like sm_setang <userid> <x> <y> <z>, preferably as a server command (rcon only).

Game: CS:S

Thanks in advance.

Last edited by stonedegg; 08-13-2013 at 19:57. Reason: Sorry for posting in amx forums :D
stonedegg is offline
Skyy
AlliedModders Donor
Join Date: Jan 2010
Location: Toronto, Canada
Old 08-14-2013 , 06:48   Re: simple plugin request
Reply With Quote #2

It sort of feels like that command is for messing with other players. Why would you want to forcefully modify a clients viewangles?
__________________
Skyy is offline
stonedegg
Senior Member
Join Date: Nov 2011
Location: de_dust2
Old 08-14-2013 , 11:24   Re: simple plugin request
Reply With Quote #3

No I want to use that on fake clients, not on a real player.
stonedegg is offline
Walliski
Senior Member
Join Date: May 2013
Old 08-14-2013 , 13:15   Re: simple plugin request
Reply With Quote #4

Maybe it would be easier to modify the fake client, instead of making another plugin for it?
Walliski is offline
stonedegg
Senior Member
Join Date: Nov 2011
Location: de_dust2
Old 08-14-2013 , 21:30   Re: simple plugin request
Reply With Quote #5

No, I just want to have this command, is that so hard to make? :/
stonedegg is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 08-14-2013 , 22:11   Re: simple plugin request
Reply With Quote #6

It's maybe 30 lines :X? Of easy code? >.<, not sure why no one has done it yet...
__________________

Last edited by thetwistedpanda; 08-14-2013 at 22:11.
thetwistedpanda is offline
imdawe
BANNED
Join Date: Aug 2011
Old 08-15-2013 , 01:01   Re: simple plugin request
Reply With Quote #7

don't be lazy guys...
Code:
#include <sourcemod>
#include <sdktools>

public OnPluginStart()
{
   RegConsoleCmd("sm_setang", Command_SetAngles);
}

public Action:Command_SetAngles(client, args)
{
   decl String:szUid[8], String:szX[8], String:szY[8], String:szZ[8];
   GetCmdArg(1, szUid, 8);
   GetCmdArg(2, szX, 8);
   GetCmdArg(3, szY, 8);
   GetCmdArg(4, szZ, 8);
   new target= GetClientOfUserId(StringToInt(szUid));
   if(!target)
      ReplyToCommand(client, "Wrong userid.");

   decl Float:angles[3];
   angles[0]=StringToFloat(szX);
   angles[1]=StringToFloat(szY);
   angles[2]=StringToFloat(szZ);
   TeleportEntity(target, NULL_VECTOR, angles, NULL_VECTOR);
}
not tested.

Last edited by imdawe; 08-20-2013 at 08:56.
imdawe is offline
Send a message via MSN to imdawe
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 08-15-2013 , 08:23   Re: simple plugin request
Reply With Quote #8

Using proccesstargetstring and a loop would be less lazy
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Skyy
AlliedModders Donor
Join Date: Jan 2010
Location: Toronto, Canada
Old 08-15-2013 , 11:27   Re: simple plugin request
Reply With Quote #9

If you want to make it even funner, you can do sm_danceparty <num> and loop through it <num> times, randomly targeting a random player each time, setting random angles. Just make sure to set it so random player can never = client (you) and that way, you're never the victim! (Conspiracy)
__________________

Last edited by Skyy; 08-15-2013 at 11:28.
Skyy is offline
stonedegg
Senior Member
Join Date: Nov 2011
Location: de_dust2
Old 08-20-2013 , 10:25   Re: simple plugin request
Reply With Quote #10

Works, thanks!
stonedegg 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 15:03.


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