Jump to content

Napalm Burn Cash

J_Oyl Jaa

Recommended Posts

This is not suggestion, just the idea that I adapt from other server.

The grenade napalm only give player a cash when detonated it. The player always get a cash every single time when they do damage with their weapon right? and when zombie die from burning napalm the kill feed will show that zombie get killed from grenade. 

So the idea is player can also earn cash from the damage napalm burning on zombie too. 
Since there are natives and apis available on ZR Grenade Effects the implement is easy one.

Using API on Grenade Ignited and create repeat timer that player can earn cash.

public int ZR_OnClientIgnited(int client, int attacker, float duration)
	g_fMaxTime[attacker] = GetEngineTime() + duration; // Time that player will stop earning cash
	CreateTimer(0.2, GiveAttackerMoney, attacker, TIMER_REPEAT); // function to give player cash

and then gave them a money

public Action GiveAttackerMoney(Handle timer, any client)
	int g_iClientCash;
	// Get current time and check that if it not exceed limited time that we set it above code. 
	if(GetEngineTime() < g_fMaxTime[client])
		// Get Current client cash
		g_iClientCash = GetEntProp(client, Prop_Send, "m_iAccount");
		// Set cash
		SetEntProp(client, Prop_Send, "m_iAccount", g_iClientCash + 10);
		// Repeat again
		return Plugin_Continue;
	// if current time exceed the the limited time then stop.
		return Plugin_Stop;

Actually this is already on my github. if you are interesting, checking here https://github.com/oylsister/ZR-Napalm-Burning-Cash

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...