Inregistrare Extra-Iteme Oameni

In jos

Inregistrare Extra-Iteme Oameni

Mesaj Scris de DarkArms la data de Sam Oct 01, 2016 12:32 pm

Includem <amxmodx> , <zombie_deathmatch> si celelalte module necesare:

Cod:
#include <amxmodx>
#include <zombie_deathmatch>

Inregistram o variabila globala:

Cod:
new g_new_human_item

Inregistram extra-itemul in meniu:

Cod:
public plugin_init()
{     
  g_new_human_item = zd_register_human_item( "New Human Item", 3000)
          /* 3000 reprezinta pretul */
}

Stabilim atributele extra-itemelor:

Cod:
public zd_human_item_selected(iPlayer, iItemIndex)
{
      if(g_new_human_item == iItemIndex)
      {
      client_print(iPlayer, print_chat, "[Zombie Deathmatch] You purchased a new human item!")
      }
}

In final va arata asa:

Cod:
#include <amxmodx>
#include <zombie_deathmatch>

new g_new_human_item

public plugin_init()
{     
  g_new_human_item = zd_register_human_item( "New Human Item", 3000)
}

public zd_human_item_selected(iPlayer, iItemIndex)
{
      if(g_new_human_item == iItemIndex)
      {
      client_print(iPlayer, print_chat, "[Zombie Deathmatch] You purchased a new human item!")
      }
}

DarkArms
Founders
Founders

Mesaje : 226
Data de inscriere : 23/09/2016
Varsta : 16
Localizare : Terra

http://lowgamers.forumgratuit.ro

Sus In jos

Re: Inregistrare Extra-Iteme Oameni

Mesaj Scris de Dracu la data de Sam Noi 12, 2016 12:14 am

Good Job!
avatar
Dracu
Moderators
Moderators

Mesaje : 193
Data de inscriere : 11/11/2016

Sus In jos

Re: Inregistrare Extra-Iteme Oameni

Mesaj Scris de Tipu la data de Mar Noi 22, 2016 10:21 pm

Good Job!
avatar
Tipu
Administrators
Administrators

Mesaje : 151
Data de inscriere : 22/11/2016

Sus In jos

Re: Inregistrare Extra-Iteme Oameni

Mesaj Scris de CelRau la data de Mar Noi 29, 2016 10:07 pm

Good Job!
avatar
CelRau
Registered user
Registered user

Mesaje : 184
Data de inscriere : 26/11/2016

Sus In jos

Re: Inregistrare Extra-Iteme Oameni

Mesaj Scris de Continut sponsorizat


Continut sponsorizat


Sus In jos

Sus

- Subiecte similare

 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum