Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: mich1103 on April 05, 2010, 12:28:22 pm

Title: Can we disable grenade for a team ? (if yes say to me how)
Post by: mich1103 on April 05, 2010, 12:28:22 pm
Ive do a zombie survival server but zombie ppl just use grenade and kick survivor ass quikly ... can we disable grenade for zombie team ?
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: Gizd on April 05, 2010, 12:33:42 pm
Set max grenades to 1 and give it to survivors on respawn.
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: mich1103 on April 05, 2010, 12:39:45 pm
ok ive set max grenade to 1
now how i give grenade on spawnt to survivors ?
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: Swompie on April 05, 2010, 12:43:37 pm
OMG CLICK! (http://devs.soldat.pl/wiki/index.php?title=GiveBonus)
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: mich1103 on April 05, 2010, 12:48:06 pm
A thing like that ?
Code: [Select]
procedure OnPlayerRespawn(ID: byte);
begin
if team = 1
then begin
GiveBonus(ID, 4: byte);
end;
end;
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: Swompie on April 05, 2010, 12:50:50 pm
Almost. Try to make you script more viewable by adding spaces and such stuff D:

Code: [Select]
procedure OnPlayerRespawn(ID: byte);
begin
  if GetPlayerStat(ID, 'Team') = 1 then
    GiveBonus(ID, 4);
end;
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: DorkeyDear on April 05, 2010, 08:29:20 pm
Sometimes OnPlayerRespawn can be a pain (since i believe it is called before player actually respawns, making it impossible to give bonus right there and then). If it is still that way, you will need to have an array[1..32] of boolean and set it to true, and ApponIdle, iterate through all of the players, and if its true, give bonus.
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: D4NG3R NL on April 06, 2010, 08:02:18 am
Whats gonna happen if an enemy stands at the same spot where someone spawns.. will probably glitch out and give the enemy grenades to :P
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: Gizd on April 06, 2010, 01:22:45 pm
Whats gonna happen if an enemy stands at the same spot where someone spawns.. will probably glitch out and give the enemy grenades to :P

No?
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: D4NG3R NL on April 08, 2010, 03:35:00 am
Whats gonna happen if an enemy stands at the same spot where someone spawns.. will probably glitch out and give the enemy grenades to :P

No?

Seen the "GiveBonus" attribute glitch out enough times (giving me flamegod instead of someone else). If I stand at the same spot as the person getting the bonus does.
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: dnmr on April 08, 2010, 06:46:37 am
never had any problems with givebonus, unlike with spawning kits
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: mich1103 on April 08, 2010, 06:48:31 am
Can i disable Med kit and nade kit spawning ?
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: Gizd on April 08, 2010, 08:41:15 am
never had any problems with givebonus, unlike with spawning kits
Same here.

Can i disable Med kit and nade kit spawning ?
No, but you can KillObject all of them.
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: dnmr on April 08, 2010, 11:30:02 am
Can i disable Med kit and nade kit spawning ?
No, but you can KillObject all of them.
or remove all the medikit/nade spawnpoints on the map. Disabling them with scripts... could work too, i guess. Never tried though.

But you still might need to kill off the twin kits that spawn randomly, if you plan to spawn kits yourself
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: mich1103 on April 08, 2010, 04:51:04 pm
How can i  procede with KillObjects ???
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: ShadowDancer on April 09, 2010, 01:08:03 am
Iterate all objects and if it's medkit - kill it.
Title: Re: Can we disable grenade for a team ? (if yes say to me how)
Post by: D4NG3R NL on April 11, 2010, 09:42:01 am
never had any problems with givebonus, unlike with spawning kits

Just joined the server where it happened (occasionally), asked the admin.. He told me it was one of his first scripts, which spawned an item/bonus @ the players point.. instead of GiveBonus.

My mistake  [retard]