1. sayfa (Toplam 1 sayfa)

[ZP] El Başı Otomatik Paket Verme

Gönderilme zamanı: Pzr Nis 08, 2018 9:47 pm
gönderen TheAsTeRiX
Eklenti İsmi : [ZP] El Başı Otomatik Paket Verme
Yapımcısı : AsTeRiX
Sürüm : 1.0
Açıklama : Herkese El Başı Otomatik Olarak 999 Cephane Paketi Verir.Her Turda Üstüne Eklemeye Devam Eder.

ONEMLI NOT !

Zombie Plague 4.3 Ve Üstü Sürümlerde Çalışır !
Kaynak Dosyası İçinden CSD Tagını Değiştirmeyi Unutmayın !


Dosya Eki
zp_elbasicp.sma

[ZP] El Başı Otomatik Paket Verme

Gönderilme zamanı: Pzr Nis 08, 2018 9:51 pm
gönderen Yek'-ta
Eklenti çok kötü yazılmış. Onayladım ama silinenlere taşıyorum. Açıklama satırlarını okursun.

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <zombieplague>

#define PLUGIN "[ZP] El Baþý CP"
#define VERSION "1.0"
#define AUTHOR "AsTeRiX"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	RegisterHam(Ham_Spawn,"player","playerrespawn",1)
}
public playerrespawn() //id nerede? buraya oyuncuyu tanımla. Değer olsun ismi.
{
	new players[32],inum,id
	get_players(players,inum)
	for(new i;i<inum;i++){ //for ? zaten spawn olunca sana değer veriyor, onu kullanacaktın. 
		id = players[i]
		zp_set_user_ammo_packs(id,zp_get_user_ammo_packs(id) + 999)
		mesajj() //içine değer gireydin de mesajj içerisinde 32 kişilik sunucuda 32*4 128 mesaj geçmesin el başında.
	}
}
public mesajj()
{
	colorchat(0,"!y[!gCSD!y] !tHesabina 999 Cephane Paketi Eklendi !")
        colorchat(0,"!y[!gCSD!y] !tHesabina 999 Cephane Paketi Eklendi !")
        colorchat(0,"!y[!gCSD!y] !tHesabina 999 Cephane Paketi Eklendi !")
	colorchat(0,"!y[!gCSD!y] !tHesabina 999 Cephane Paketi Eklendi !")
}
//colorchata gerek yok, client_print_color kullanabilirsin.
stock colorchat(const id, const input[], any:...) {
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4") // Green
	replace_all(msg, 190, "!y", "^1") // Yellow
	replace_all(msg, 190, "!t", "^3") // Team
	
	if (id) players[0] = id; else get_players(players, count, "ch")
	{
		for (new i = 0; i < count; i++)
		{
			if (is_user_connected(players[i]))
			{
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
		}
	}
}