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

[NMRiH]Help add a command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 07-05-2023 , 06:36   [NMRiH]Help add a command
Reply With Quote #1

How can I quickly add a command to the resurrected player list
So I can directly choose the name of the player to resurrect

At present, the plugin enters sm_rsp to pop up the first menu, and then pops up the second menu when selecting the player to be resurrected, at this time pops up the third menu, the player's name list, how to use a command to pop up the third menu directly, the name list of the player to be resurrected, so that you can choose which players you want to revive more quickly

If the plug-in can't add commands, can you use adminmenu_custom to do so?
Attached Files
File Type: sp Get Plugin or Get Source (c_nmrih_simple_respawn.sp - 48 views - 10.6 KB)
__________________
I like this BBS sharing of spirit

I come from China, my English is poor

Last edited by phoenix0001; 07-05-2023 at 06:40.
phoenix0001 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 07-05-2023 , 09:12   Re: [NMRiH]Help add a command
Reply With Quote #2

phoenix0001, try this
Attached Files
File Type: sp Get Plugin or Get Source (c_nmrih_simple_respawn 1.2.0.sp - 42 views - 9.3 KB)
__________________
Grey83 is offline
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 07-05-2023 , 11:35   Re: [NMRiH]Help add a command
Reply With Quote #3

Quote:
Originally Posted by Grey83 View Post
phoenix0001, try this
It does work better than before

Each of the following functions has a command to operate
But the Menu Item Respawn, the Respawn player, the menu list that resurrects the player, has no command
Can you add one?
So I can enter this command to go directly to Respawn player, {menu list of resurrected players} and select the player to resurrect


PHP Code:
    RegAdminCmd("sm_rsp",                Command_RespawnMenuADMFLAG_GENERIC"NMRiH respawn menu");
    
RegAdminCmd("sm_rspme",                Command_RespawnSelfADMFLAG_GENERIC"NMRiH respawn self");
    
RegAdminCmd("sm_rspall",            Command_RespawnAllADMFLAG_GENERIC"NMRiH respawn all players");
    
RegAdminCmd("sm_killall",            Command_NukePlayersADMFLAG_GENERIC"Kills all players, then ends the round");
    
RegAdminCmd("sm_freezeplayers",        Command_FreezeAllPlayersADMFLAG_GENERIC"Freezes all players");
    
RegAdminCmd("sm_unfreezeplayers",    Command_UnfreezeAllPlayersADMFLAG_GENERIC"Unfreezes all players");
    
RegAdminCmd("sm_freezezombies",        Command_FreezeAllNPCsADMFLAG_GENERIC"Freezes all NPCs");
    
RegAdminCmd("sm_unfreezezombies",    Command_UnfreezeAllNPCsADMFLAG_GENERIC"Unfreezes all NPCs");
    
RegAdminCmd("sm_restround",            Command_RestartRoundADMFLAG_GENERIC"Restarts round immediately"); 
__________________
I like this BBS sharing of spirit

I come from China, my English is poor
phoenix0001 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 07-05-2023 , 12:40   Re: [NMRiH]Help add a command
Reply With Quote #4

Quote:
Originally Posted by phoenix0001 View Post
But the Menu Item Respawn, the Respawn player, the menu list that resurrects the player, has no command
Can you add one?
So I can enter this command to go directly to Respawn player, {menu list of resurrected players} and select the player to resurrect
command sm_rsplist
Attached Files
File Type: sp Get Plugin or Get Source (c_nmrih_simple_respawn 1.2.1.sp - 38 views - 9.4 KB)
__________________
Grey83 is offline
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 07-05-2023 , 14:36   Re: [NMRiH]Help add a command
Reply With Quote #5

Quote:
Originally Posted by Grey83 View Post
command sm_rsplist
Thank you very much
Now the plugin is perfect

There is one small problem
Can there be a hint at the resurrection?
For example: Player A resurrects Player B
So we can see who resurrected whom.
__________________
I like this BBS sharing of spirit

I come from China, my English is poor
phoenix0001 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 07-05-2023 , 22:55   Re: [NMRiH]Help add a command
Reply With Quote #6

phoenix0001, RespawnClient(player);
==>
if(RespawnClient(player)) PrintToChatAll("%N resurrects %N", client, player);

and RespawnAll();
==>
int num = RespawnAll();
if(num) PrintToChatAll("%N resurrects %d players", client, num);
__________________

Last edited by Grey83; 07-05-2023 at 22:56.
Grey83 is offline
phoenix0001
Senior Member
Join Date: Apr 2010
Location: China
Old 07-06-2023 , 04:19   Re: [NMRiH]Help add a command
Reply With Quote #7

Quote:
Originally Posted by Grey83 View Post
phoenix0001, RespawnClient(player);
==>
if(RespawnClient(player)) PrintToChatAll("%N resurrects %N", client, player);

and RespawnAll();
==>
int num = RespawnAll();
if(num) PrintToChatAll("%N resurrects %d players", client, num);
Thank you very much: bacon!:
__________________
I like this BBS sharing of spirit

I come from China, my English is poor
phoenix0001 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 01:28.


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