deathmatch (5 minutes =ak, 10 minutes = awp, 15 minutes = usp)
hi, i looking for a plugin whose can add deatchmatch (ex. 0-5 minut = only AK, 5-10 = Only AWP, 10-15 = only usp)
|
Re: deathmatch (5 minutes =ak, 10 minutes = awp, 15 minutes = usp)
for example. 5 * 60 = 300, create a timer on 300 sec. make a callback function, exec a config which allows the prefered weapons. done.
|
Re: deathmatch (5 minutes =ak, 10 minutes = awp, 15 minutes = usp)
Quote:
PHP Code:
|
Re: deathmatch (5 minutes =ak, 10 minutes = awp, 15 minutes = usp)
Quote:
Here are some notes about your code that you should take in: 1. If you're not passing any data on a timer handle, you don't need to put "INVALID_HANDLE" in there. Just simply use an underscore like this: CreateTimer(1.0, Timer_Callback, _, TIMER_REPEAT); 2. ++i is equivalent to i + 2. You should be using i++ instead. 3. Change the following: PHP Code:
PHP Code:
5. You can make the following a lot easier by changing it from: PHP Code:
PHP Code:
PHP Code:
|
Re: deathmatch (5 minutes =ak, 10 minutes = awp, 15 minutes = usp)
Quote:
2. I tested it, and the output is the same as i++ (what it's doing is incrementing by 1 + i rather than i + 1) 3. I don't see the need for that? It functions the same way 4. I thought global variables wouldn't reset on map starts? 5. My way is more efficient but I can see why. |
Re: deathmatch (5 minutes =ak, 10 minutes = awp, 15 minutes = usp)
Quote:
2. My bad on that one. You didn't change the value of g_iWeapon before doing ++g_iWeapon so it still uses the initial value, so there's no problem with that one. 4. They don't. I'm just saying that you don't need to assign it to 0 as a global while also assigning as 0 on OnMapStart(). Again it's up to you, nothing bad. 5. While your way may be more efficient, it would make more sense to just check if the weapon has "ak47" in it. You could also use StrEqual to just check for "weapon_ak47". |
Re: deathmatch (5 minutes =ak, 10 minutes = awp, 15 minutes = usp)
How can i replace ak47 with pistols ?
I want to make first 10 minutes pistol , 10 minutes rifles and 10 minutes awp |
Re: deathmatch (5 minutes =ak, 10 minutes = awp, 15 minutes = usp)
it's better to add an editable version
|
Re: deathmatch (5 minutes =ak, 10 minutes = awp, 15 minutes = usp)
This works with Deathmatch Advanced. Add the times and mode names from deathmatch.ini (not simple).
Code:
#pragma semicolon 1 |
Re: deathmatch (5 minutes =ak, 10 minutes = awp, 15 minutes = usp)
can you help me
is everything right? Code:
#include <sourcemod> |
All times are GMT -4. The time now is 03:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.