benım serverımde awp yı 15 kısı alıyor 1 takımdan boyle olunca awp ındıa oynanıyor yanı bunun onune gecmek ıcın bı plugın yapılabılırmı mısal her el 5 tane awp sınırı werıcek 6. olunca aldırtmıycak her el toplam 5 kısıde awp olucak boyle bısıy yapılabılırmı acaba
Konu
Bir denersin;
PHP Kod:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#define PLUGIN "Yeni Plugin"
#define VERSION "1.0"
#define AUTHOR "Kalipso22"
new g_awp,bool:g_alamazsin;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your code here...
}
public CS_OnBuyAttempt(id, CSI_AWP){
g_awp = 0;
new players[32],inum;
static tempid;
get_players(players,inum)
for(new i; i<inum; i++)
{
if(user_has_weapon(tempid, CSW_AWP)){
g_awp++
if(g_awp > 5){
g_alamazsin = true;
}
else{
g_alamazsin = false;
}
}
}
return PLUGIN_HANDLED;
}
public CS_OnBuy(id,CSI_AWP){
if(g_alamazsin){
renkli_yazi(id,"!g5'ten fazla !tAWP !goldugu icin satin alamazsin!");
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
stock renkli_yazi(const id, const Input[], any:...)
{
static Message[191];
vformat(Message, 190, Input, 3);
replace_all(Message, 190, "!n", "^x01");
replace_all(Message, 190, "!g", "^x04");
replace_all(Message, 190, "!t", "^x03");
#if AMXX_VERSION_NUM < 183
new Count = 1, Players[32];
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(Message);
message_end();
}
}
}
#else
client_print_color(id, id, Message);
#endif
}
Son Düzenleme: 12-08-2020, 03:08, Düzenleyen: Kalipso22.
deniyorum
işe yaramadı yanımda adam yoktu 0 yaptım degerı denedım kendım awp alabılıyorum
işe yaramadı yanımda adam yoktu 0 yaptım degerı denedım kendım awp alabılıyorum
Son Düzenleme: 13-08-2020, 02:17, Düzenleyen: cserdem06.
PHP Kod:
/* Sublime AMXX Editor v2.2 */
#include <amxmodx>
#include <cstrike>
new iL_AwpT,iL_AwpCT;
public plugin_init() {
register_plugin("Bir Eklenti", "1.0", "PawNod'")
register_logevent("pRE", 2, "1=Round_End");
}
public pRE() {
iL_AwpT = 0;iL_AwpCT = 0;
}
public CS_OnBuyAttempt(iP_ID, iL_Item){
if((iL_Item == CSI_AWP) && iL_AwpT >= 5 && get_user_team(iP_ID) == 1) {
client_print(iP_ID,print_chat,"5'ten Fazla Awp Oldugu Icin Alamazsin")
return PLUGIN_HANDLED;
}
if((iL_Item == CSI_AWP) && iL_AwpCT >= 5 && get_user_team(iP_ID) == 2) {
client_print(iP_ID,print_chat,"5'ten Fazla Awp Oldugu Icin Alamazsin")
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public CS_OnBuy(iP_ID,iL_Item) {
if((iL_Item == CSI_AWP) && get_user_team(iP_ID) == 1) iL_AwpT++
if((iL_Item == CSI_AWP) && get_user_team(iP_ID) == 2) iL_AwpCT++
}
Son Düzenleme: 13-08-2020, 20:19, Düzenleyen: PawNod'.
CSI_ Yazan yerleri CSW_ Olarak değiştirip deneyin.
PHP Kod:
#include <amxmodx>
#include <cstrike>
new iL_AwpT,iL_AwpCT;
public plugin_init() {
register_plugin("Bir Eklenti", "1.0", "PawNod'")
register_logevent("pRE", 2, "1=Round_End");
}
public pRE() {
iL_AwpT = 0;iL_AwpCT = 0;
}
public CS_OnBuyAttempt(iP_ID, iL_Item){
if((iL_Item == CSW_AWP) && iL_AwpT >= 5 && get_user_team(iP_ID) == 1) {
client_print(iP_ID,print_chat,"5'ten Fazla Awp Oldugu Icin Alamazsin")
return PLUGIN_HANDLED;
}
if((iL_Item == CSW_AWP) && iL_AwpCT >= 5 && get_user_team(iP_ID) == 2) {
client_print(iP_ID,print_chat,"5'ten Fazla Awp Oldugu Icin Alamazsin")
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public CS_OnBuy(iP_ID,iL_Item) {
if((iL_Item == CSW_AWP) && get_user_team(iP_ID) == 1) iL_AwpT++
if((iL_Item == CSW_AWP) && get_user_team(iP_ID) == 2) iL_AwpCT++
}
Son Düzenleme: 13-08-2020, 23:14, Düzenleyen: scuro.
)

