AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem with weapons (https://forums.alliedmods.net/showthread.php?t=182902)

bazhenov93 04-14-2012 19:11

Problem with weapons
 
1 Attachment(s)
I made a plugin for my sv, but it does not work :(

Can anyone check it and tell me where is the error? thanks,,,,

rak 04-14-2012 19:22

Re: Problem with weapons
 
please.. read more tutorials because you don't know what are you doing

Neeeeeeeeeel.- 04-14-2012 19:24

Re: Problem with weapons
 
This could be done in 50 lines or less.

bazhenov93 04-14-2012 19:26

Re: Problem with weapons
 
How? make an example.. and i will learn^^

Neeeeeeeeeel.- 04-14-2012 19:30

Re: Problem with weapons
 
Read about loops and constants:)
And also about identation...

GXLZPGX 04-14-2012 21:33

Re: Problem with weapons
 
I would suggest you read some tutorials or look into some simple plugins and get a feel for how things are done.

You can find a whole forum based on Code Snippets/Tutorials by clicking here.

If you specifically need help with menus, look here.

And a guide to searching the forums here.

StickP0le 04-15-2012 00:08

Re: Problem with weapons
 
omfg, please read tutorials before trying to make a plugin what is this supossed to mean
Code:
 switch(key)     {     case 'a':     {     switch( key )     {

StickP0le 04-15-2012 00:30

Re: Problem with weapons
 
iŽll show you an example
Code:
 new const DATA[][] = { "P228", "SCOUT", "XM1014", "MAC10", "AUG", "ELITE", "FIVESEVEN", "UMP45", "SG550",     "GALIL", "FAMAS", "USP", "GLOCK18", "AWP", "MP5NAVY", "M249", "M3", "M4A1", "TMP", "G3SG1", "DEAGLE", "AK47", "P90", "HE GRENADE", "FLASH GRENADE", "SMOKE GRENADE" } // ================================================================================================= // weapons menu // ================================================================================================= public wpmenu(id) {     static Item[64], num[27]     formatex(Item, charsmax(Item), "\d...................^n\rWEAPONS MENU^n\w>>>>>>>>> \d")     new menu = menu_create(Item, "wpmenu_handler")         for (new i = 0; i > 26; i++)     {         num_to_str(i, num, 26)         menu_additem(menu, DATA[i], num)     }         menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)     menu_display(id, menu) }
you have to use your head and see how to optimize all the code with this example

bazhenov93 04-15-2012 16:39

Re: Problem with weapons
 
1 Attachment(s)
Quote:

Originally Posted by StickP0le (Post 1689415)
omfg, please read tutorials before trying to make a plugin what is this supossed to mean Code:
Code:

switch(key)
    {
    case 'a':
    {
    switch( key )
    {


I readed a tutorial here http://forums.alliedmods.net/showthr...4#MultiHandler

ok.. and what's wrong now? :(


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

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