Raised This Month: $12 Target: $400
 3% 

RoundStart?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
}{eads}{oT
Junior Member
Join Date: May 2006
Old 05-27-2006 , 15:35   RoundStart?
Reply With Quote #1

Hello, how do I execute a function whenever the round starts? Would it be an event? I don't know anything about events
}{eads}{oT is offline
unnamed :)
Member
Join Date: Apr 2006
Old 05-27-2006 , 15:40  
Reply With Quote #2

In plugin_init
Code:
register_event("ResetHUD","resethud","b")
or if you want round_start which is difficult to use try this
Code:
register_logevent("round_start", 2, "1=Round_Start")
unnamed :) is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-27-2006 , 15:42  
Reply With Quote #3

Don't use ResetHud, it can be exploited by players.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
}{eads}{oT
Junior Member
Join Date: May 2006
Old 05-27-2006 , 15:45  
Reply With Quote #4

Is that all I have to do is
Code:
register_logevent("round_start", 2, "1=Round_Start")
In the plugin_init() ?
}{eads}{oT is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-27-2006 , 15:47  
Reply With Quote #5

Yes, and round_start is the function to call on the event.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
}{eads}{oT
Junior Member
Join Date: May 2006
Old 05-27-2006 , 15:51  
Reply With Quote #6

Is this right?
Code:
/* * Created by: }{eads}{oT -- Version: 0.1 -- Plugin name: Stealth Mod * Created for AMXX - If wanted to port to AMX, feel free without permission. * Please add me to credit's though. * */ #include <amxmodx> #include <amxmisc> #include <fun> public guns(id) {     set_user_footsteps(id, 1)     give_item(id, "weapon_m4a1")     give_item(id, "weapon_m4a1")     give_item(id, "weapon_m4a1") } public round_start(id) {     set_user_footsteps(id, 1)     give_item(id, "weapon_m4a1")     give_item(id, "weapon_m4a1")     give_item(id, "weapon_m4a1") } public plugin_init() {     register_plugin("Stealth Mod","0.1","}{eads}{oT")     register_logevent("round_start", 2, "1=Round_Start") }
}{eads}{oT is offline
unnamed :)
Member
Join Date: Apr 2006
Old 05-27-2006 , 15:59  
Reply With Quote #7

No do it like this:
Code:
public round_start() {     new players[32], inum     get_players(players, inum)     for(new i = 0; i < inum; i++) {         set_user_footsteps(players, 1)         give_item(players, "weapon_m4a1")         give_item(players, "weapon_m4a1")         give_item(players, "weapon_m4a1")     }     return PLUGIN_CONTINUE }
unnamed :) is offline
}{eads}{oT
Junior Member
Join Date: May 2006
Old 05-27-2006 , 17:08  
Reply With Quote #8

Code:
#include <amxmodx> #include <amxmisc> #include <fun> public plugin_init() {     register_plugin("Stealth Mod", "0.1", "HeadsHoT")     register_logevent("round_start", 2, "1=Round_Start") } public round_start() {     new players[32], inum     get_players(players, inum)     for(new i = 0; i < inum, i++)     {         set_user_footsteps(players, 1)         give_item(players, "weapon_m4a1")         give_item(players, "weapon_m4a1")         give_item(players, "weapon_m4a1")     }     return PLUGIN_CONTINUE }
}{eads}{oT is offline
}{eads}{oT
Junior Member
Join Date: May 2006
Old 05-27-2006 , 18:19  
Reply With Quote #9

Code:
Welcome to the AMX Mod X 1.70-300 Compiler.
Copyright (c) 1997-2005 ITB CompuPhase, AMX Mod X Team

Error: Expected token: ";", but found ")" on line 15
Error: Argument type mismatch (argument 1) on line 17
Error: Argument type mismatch (argument 1) on line 18
Error: Argument type mismatch (argument 1) on line 19
Error: Argument type mismatch (argument 1) on line 20

5 Errors.
Could not locate output file C:\Program Files\Steam\SteamApps\djuice27\dedicated server\cstrike\addons\amxmodx\scripting\stealth_mod.amx (compile failed).
}{eads}{oT is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-27-2006 , 18:31  
Reply With Quote #10

players[i] instead of just players for the give_item's
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 14:28.


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