Raised This Month: $51 Target: $400
 12% 

help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mix97
Junior Member
Join Date: Aug 2011
Old 09-02-2011 , 18:23   help
Reply With Quote #1

#1
pls help.....
its wrong

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <colorchat>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
#include <nvault>


#define PLUGIN "ClassChanger"
#define VERSION "0.1"
#define AUTHOR "Mix97"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

// Add your code here...
}
register_clcmd("say /class", "ChangeClass")
register_clcmd("say_team /class", "ChangeClass")


public ChangeClass(id)
{
if(cs_get_user_team(id) == CS_TEAM_CT)
{
new menu = menu_create("Izaberi svog Avatara:", "ChangeClass_Handle")
menu_additem(menu, "Avatar \r[ HEALTH+ ]", "1", 0)
menu_additem(menu, "Zmaj \r[ , HEALTH+ ]", "2", 0)
menu_additem(menu, "Bik \r[ HEALTH+ ]", "3", 0)

menu_setprop(menu , MPROP_EXIT , MEXIT_ALL)
menu_display(id , menu , 0)
}

if(cs_get_user_team(id) == CS_TEAM_T)
{
new menu = menu_create("Izaberi svog Vojnika:", "ChangeClass_Handle")
menu_additem(menu, "Marinac \r[ \yDeagle \r]", "1", 0)
menu_additem(menu, "Komandant \r[ \yM4A1 \r+ \yAK47 \r]", "2", 0)
menu_additem(menu, "Snajperista \r[ \yAWP \r]", "3", 0)

menu_setprop(menu , MPROP_EXIT , MEXIT_ALL)
menu_display(id , menu , 0)
}
}


public ChangeClass_Handle(id, menu, item) /*Sta se desava kad igrac izabere klasu*/
{
if(cs_get_user_team(id) == CS_TEAM_CT)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
ColorChat(id, GREEN, "[AV Mod By Mix97] ^1Zavaram menu...")
}

new szCommand[6]
new szName[64]
new access
new callback

menu_item_getinfo (menu, item, access, szCommand, 5, szName, 63, callback)

new i = str_to_num(szCommand)
if(PlayerClassCT[id] != i)
{
PlayerClassCT[id] = i
ColorChat ( id, GREEN, "[AV Mod By Mix97] ^1Sada ste ili sledece runde ste ^3%s", CLASSES_CT[i])
}
else
{
ColorChat ( id, GREEN, "[AV Mod By Mix97] ^1Vec si ^3%s", CLASSES_CT[i])
}

menu_destroy(menu)
ColorChat(id, GREEN, "[AV Mod By Mix97] ^1Zatvaram menu...")
}

if ( cs_get_user_team(id) == CS_TEAM_T)
{
if ( item == MENU_EXIT )
{
menu_destroy(menu)
ColorChat(id, GREEN, "[AV Mod By Mix97] ^1Zavaram menu")
}

new szCommand[6]
new szName[64]
new access
new callback

menu_item_getinfo(menu, item, access, szCommand, 5, szName, 63, callback)

new i = str_to_num(szCommand)

if(PlayerClassT[id] != i)
{
PlayerClassT[id] = i;
ColorChat(id, GREEN, "[AV Mod By Mix97] ^1Sada ste ili sledece runde ste ^3%s", CLASSES_T[i])
}

else
{
ColorChat(id, GREEN, "[AV Mod By Mix97] ^1Vec si ^3%s", CLASSES_T[i])
}

menu_destroy(menu)
ColorChat(id, GREEN, "[AV Mod By Mix97] ^1Zatvaram menu...")
}
return PLUGIN_CONTINUE
}
Mix97 is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 09-02-2011 , 18:37   Re: help
Reply With Quote #2

Enclose code in [code]code here...[/code] or [php]code here...[/php] and give more details on what is wrong.
__________________
Hunter-Digital is offline
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 09-02-2011 , 19:25   Re: help
Reply With Quote #3

omg http://forums.alliedmods.net/showthr...86#post1546686 xD
anyway, start from here
http://forums.alliedmods.net/forumdisplay.php?f=83
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Reply



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 09:11.


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