Raised This Month: $18 Target: $400
 4% 

REQ automatic revive VIP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mousesports
Senior Member
Join Date: Oct 2010
Old 03-25-2020 , 14:47   REQ automatic revive VIP
Reply With Quote #1

Good evening,
I need a plugin, which will give automatically, but with a 0.5% chance to revive the vip when they are killed. With this plugin I have attached, those with vip can write / revive. Please change it to automatic revive with random spawn, with a 0.5% chance if you can. Thank you !



PHP Code:
#include <amxmodx>
#include <hamsandwich>

static const
PLUGIN[] = "",
VERSION[] = "1.0",
AUTHOR[] = "scosmyn";

new 
count[33] = 0

public plugin_init() {
register_plugin(PLUGIN,VERSION,AUTHOR);

register_clcmd("say /revive","cmdRevive")

register_logevent("round_start",2,"1=Round_Start");
}

public 
round_start( ) {
static 
i
for(1<= get_maxplayers(); i++)
count 0
}

public 
cmdRevive(id) {
if(
count[id] == 3)
{
color(id,"!team[V.I.P REVIVE] !yAi folosit deja de 3 ori !grevive !yrunda viitoare poti accesa dinou!")
return 
1
}
if(
is_user_alive(id))
return 
1

if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
color(id,"!team[V.I.P REVIVE] !yNu ai acces la /revive , doar !gV.I.P-ul !yare acces!")
return 
1
}

count[id]++

ExecuteHam(Ham_CS_RoundRespawn,id)
return 
0
}

stock color( const id, const input[ ], any:... )
{
new 
count 1players32 ]

static 
msg191 ]
vformatmsg190input)

replace_allmsg190"!g""^4" //- verde
replace_allmsg190"!y""^1" //- galben
replace_allmsg190"!team""^3" //- echipa
replace_allmsg190"!n""^0" //- normal

if( id players] = id; else get_playersplayerscount"ch" )
{
for( new 
0counti++ )
{
if( 
is_user_connectedplayers] ) )
{
message_beginMSG_ONE_UNRELIABLEget_user_msgid"SayText" ), _players] )
write_byteplayers] );
write_stringmsg );
message_end( );
}
}
}

__________________

Last edited by mousesports; 03-25-2020 at 15:00.
mousesports is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 03-26-2020 , 06:54   Re: REQ automatic revive VIP
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init()
{
  
RegisterHam(Ham_Killed"player""hamplayer_killed_post"1)
}

public 
hamplayer_killed_post(client)
{
  if(
is_user_connected(client)
    && 
get_user_flags(client) & ADMIN_LEVEL_H
    
&& random(200) == 1)
  {
    
ExecuteHam(Ham_CS_RoundRespawnclient)
  }

__________________
Retired.
Xalus is offline
mousesports
Senior Member
Join Date: Oct 2010
Old 03-26-2020 , 07:18   Re: REQ automatic revive VIP
Reply With Quote #3

Can you please integrate it ? And there its a chance of resurect 0.5 % or 1 % >? I dont want resurect all the time .. I need a lotery with a chance . Thank you !
__________________

Last edited by mousesports; 03-26-2020 at 07:27.
mousesports is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-26-2020 , 07:58   Re: REQ automatic revive VIP
Reply With Quote #4

He already did. The "random(200)" part of the code is 0.5% chance.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
mousesports
Senior Member
Join Date: Oct 2010
Old 03-26-2020 , 08:16   Re: REQ automatic revive VIP
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
He already did. The "random(200)" part of the code is 0.5% chance.
Thank you ! I dont know how to integrate that code , just copy and pase on the first part of plugin ? Can you please do it for me ? thank you !
__________________
mousesports is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 03-26-2020 , 08:20   Re: REQ automatic revive VIP
Reply With Quote #6

So you want the /revive command to exist to?
__________________
Retired.
Xalus is offline
mousesports
Senior Member
Join Date: Oct 2010
Old 03-26-2020 , 08:24   Re: REQ automatic revive VIP
Reply With Quote #7

I don't know if I was explicit enough. I want this plugin to automatically use the revive command for those who have a vip flag, but with a 0.5% chance without them writing / reviving. When that revive is received, he will be randomly placed on the map with the weapon he had before he died. The respective chance of 0.5% being active, if there are at least 2 players alive in the team of which that VIP is part.
__________________
mousesports is offline
mousesports
Senior Member
Join Date: Oct 2010
Old 03-26-2020 , 08:26   Re: REQ automatic revive VIP
Reply With Quote #8

Quote:
Originally Posted by Xalus View Post
So you want the /revive command to exist to?
No , i dont want that command . I posted that plugin to make it easier to edit for those who want to help me. I don't understand and I don't know if this will help or make it difficult for you.
__________________
mousesports is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-26-2020 , 08:32   Re: REQ automatic revive VIP
Reply With Quote #9

Then simply use his plugin. That's the entire code that's needed. No need to integrate anything.
__________________

Last edited by OciXCrom; 03-26-2020 at 08:32.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
mousesports
Senior Member
Join Date: Oct 2010
Old 03-26-2020 , 08:42   Re: REQ automatic revive VIP
Reply With Quote #10

Quote:
Originally Posted by OciXCrom View Post
Then simply use his plugin. That's the entire code that's needed. No need to integrate anything.
#include <amxmodx>
#include <hamsandwich>

public plugin_init()
{
RegisterHam(Ham_Killed, "player", "hamplayer_killed_post", 1)
}

public hamplayer_killed_post(client)
{
if(is_user_connected(client)
&& get_user_flags(client) & ADMIN_LEVEL_H
&& random(200) == 1)
{
ExecuteHam(Ham_CS_RoundRespawn, client)
}
}

this its all i need? That plugin have /revive comand so i dont need .... You dont understand me ..
__________________
mousesports is offline
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 13:22.


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