Raised This Month: $ Target: $400
 0% 

Need help with a few things


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Martin1
BANNED
Join Date: May 2006
Old 11-25-2006 , 13:24   Need help with a few things
Reply With Quote #1

1. i am trying to make a turn based mod and there are some thtings i cannot figure out.

1. How can i make it so sv_maxspeed is 0 (so noone can move) but through the menu force them to move.
2. How would i make them move in any base, because cmd_client(+forward will not work because its a + command.

Answer me and free cookies
Martin1 is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-25-2006 , 13:33   Re: Need help with a few things
Reply With Quote #2

here this will make all players freeze on spawn. then use the same set_user_maxspeed i did to unfrezze whoever.
Code:
#include <amxmodx> #include <amxmisc> #include <fun> #define MAX_PLAYERS            32 new bool:g_restart_attempt[MAX_PLAYERS + 1] public plugin_init() {     register_plugin("whatever","0.1","The Speicialist");     register_event("ResetHUD", "event_hud_reset", "be")     register_clcmd("fullupdate", "clcmd_fullupdate")     register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in") } public clcmd_fullupdate() {     return PLUGIN_HANDLED } public event_restart_attempt() {     new players[32], num     get_players(players, num, "a")     for (new i; i < num; ++i)     {         g_restart_attempt[players[i]] = true     } } public event_hud_reset(id) {     if (g_restart_attempt[id])     {         g_restart_attempt[id] = false         return     }     event_player_spawn(id) } public event_player_spawn(id) {     set_user_maxspeed(id,1.0); }

Last edited by The Specialist; 11-25-2006 at 14:48.
The Specialist is offline
Send a message via AIM to The Specialist
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 11-25-2006 , 14:25   Re: Need help with a few things
Reply With Quote #3

setting maxspeed to 0.0 does not make the player stopped (it makes them keep the same speed or something, but it doesn't stop them) so you can just set it to 1.0

then to have them move by a menu, you could have the menu set their velocities and they will just move with the velocity and have no control over it.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
The Specialist
BANNED
Join Date: Nov 2006
Old 11-25-2006 , 14:47   Re: Need help with a few things
Reply With Quote #4

fixed my originol code and set max speed to 1.0 like EMP' said its safe to use my code now. thanks EMP

Last edited by The Specialist; 11-25-2006 at 14:50.
The Specialist is offline
Send a message via AIM to The Specialist
Reply


Thread Tools
Display Modes

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


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