Expected behaviour:Could you be more specific ?
What do you mean by not able to run the plugin ?
Is it not loading or loading but not working ?
If not working, then what is the expected behavior and what is actually happening ?
These things you should mention while asking the question.
But fs plugin also has no prefixChange
ToC++:RegAdminCmd("pause", Pause_game, ADMFLAG_CUSTOM1); RegAdminCmd("unpause", UnPause_game, ADMFLAG_CUSTOM1);
C++:RegAdminCmd("sm_pause", Pause_game, ADMFLAG_CUSTOM1); RegAdminCmd("sm_unpause", UnPause_game, ADMFLAG_CUSTOM1);
The problem is not the prefix. The problem are the words "pause" and "unpause". They are kind of reserved words. You can't use them without sm_ prefix or hooking chat.But fs plugin also has no prefix
Expected behaviour:
Movement of every player should be stopped and color of them should be changed to blue.
And after 30 sec, they will automatically get unfreezed
You are doing wrong while freezing the players.Pause command worked but why am I not able to stop all player's movement by this???
for(int i = 1; i <= MaxClients; i++)
{
new AllClient = GetClientSerial(i);
FreezePlayer(AllClient);
}
for(int i = 1; i <= MaxClients; i++)
{
if(IsClientInGame(i) && !IsFakeClient(i))
{
int userid = GetClientUserId(i);
ServerCommand("sm_freeze #%d 30", userid);
}
}
Ok Thanks so much.The problem is not the prefix. The problem are the words "pause" and "unpause". They are kind of reserved words. You can't use them without sm_ prefix or hooking chat.
You are doing wrong while freezing the players.
Instead of this code,
Simply use,C++:for(int i = 1; i <= MaxClients; i++) { new AllClient = GetClientSerial(i); FreezePlayer(AllClient); }
You do not need to implement the freezing functionality again.C++:for(int i = 1; i <= MaxClients; i++) { if(IsClientInGame(i) && !IsFakeClient(i)) { int userid = GetClientUserId(i); ServerCommand("sm_freeze #%d 30", userid); } }
hi bro can publish your script?Ok Thanks so much.
But WHY ????hi bro can publish your script?
I want to use itBut WHY ????
It's not done yet. You can check with @XTreme killerI want to use it
switch(error)It's not done yet. You can check with @XTreme killer
wm_max_rounds
is set to "15". And the current round counter inside warmod plugin keeps track of the rounds played.isPausable=false
.isPausable=true
and set the convar mp_roundtime value to (current round time +30) and set the convar mp_freezetime value to 30.if(isPausable)
then set the mp_roundtime and mp_freezetime values back to original.And set isPausable to false.It makes round pause for next round not for current round.The manual setting of CT score won't reflect in game, becausewm_max_rounds
is set to "15". And the current round counter inside warmod plugin keeps track of the rounds played.
So you need to avoid round end.
Better do this -->
Assuming you want to pause for 30 seconds
1. Use global boolean variableisPausable=false
.
2. Hook round start event in OnPluginStart.
3. Any team calls !pause.
4. On command action makeisPausable=true
and set the convar mp_roundtime value to (current round time +30) and set the convar mp_freezetime value to 30.
5. In round start event,if(isPausable)
then set the mp_roundtime and mp_freezetime values back to original.And set isPausable to false.
It will be available in ris soon.I want to use it
We get it, advertisements are annoying!
Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.