Raised This Month: $ Target: $400
 0% 

Problem with Variable


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MPKiller545
Junior Member
Join Date: Aug 2011
Old 05-02-2012 , 06:06   Problem with Variable
Reply With Quote #1

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(PLUGINVERSIONAUTHOR)
RegisterHam(Ham_Spawn"player""menubronie"1);

}


public 
menubronie(id)
{

mBronie menu_create("Bronie""mh_bronie")
menu_additem(mBronie"M4A1""1"0)
menu_display(idmBronie0)
numer 0
}



public 
mh_bronie(idmenuitem) {

if(
numer >= 1)
{
set_hudmessage(02550, -1.00.1706.012.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*

Last edited by MPKiller545; 05-02-2012 at 06:14.
MPKiller545 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode