Hi There!
I have some troubles with my plugin. I wanted to that one variable will have other values for each players, for example:
Tne New Round Started, players from Team A have earned 1 point to spend for weapons. Player A from Team A want to buy a M4A1 for 1 point. When he buy it, the rest of the teeam cant buy that M4A1 because they have a massage that they dont have any points.
Code:
*Sorry for my English, Im from Poland*
***CODE***
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "New Plug-in"
#define VERSION "1.0"
#define AUTHOR "author"
new mBronie
new numer
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "menubronie", 1);
}
public menubronie(id)
{
mBronie = menu_create("Bronie", "mh_bronie")
menu_additem(mBronie, "M4A1", "1", 0)
menu_display(id, mBronie, 0)
numer = 0
}
public mh_bronie(id, menu, item) {
if(numer >= 1)
{
set_hudmessage(0, 255, 0, -1.0, 0.17, 0, 6.0, 12.0)
show_hudmessage(id, "Niestety, ale juz wykorzystales wszystkie punkty.")
return PLUGIN_HANDLED
}
switch(item)
{
case 0:
{
give_item(id,"weapon_m4a1")
give_item(id,"ammo_556nato")
give_item(id,"ammo_556nato")
give_item(id,"ammo_556nato")
numer = numer + 1
}
}
PL -> ENG
*Bronie - Weapons*
*numer - number*