AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   please help on my custom clip and bpammo on my custom plugin!!!!! (https://forums.alliedmods.net/showthread.php?t=125984)

jc980 05-04-2010 10:21

please help on my custom clip and bpammo on my custom plugin!!!!!
 
1 Attachment(s)
well, i dont know how to put clip and bpammo before, so im asking for help!

here is .SMA file!

wrecked_ 05-04-2010 15:37

Re: please help on my custom clip and bpammo on my custom plugin!!!!!
 
cs_set_weapon_ammo( weaponindex, amount )
cs_set_user_bpammo( playerindex, CSW_const, amount )

jc980 05-04-2010 22:24

Re: please help on my custom clip and bpammo on my custom plugin!!!!!
 
Quote:

Originally Posted by wrecked_ (Post 1170528)
cs_set_weapon_ammo( weaponindex, amount )
cs_set_user_bpammo( playerindex, CSW_const, amount )

ah, can u please show an example of that to where to put it?????

wrecked_ 05-04-2010 22:28

Re: please help on my custom clip and bpammo on my custom plugin!!!!!
 
Code:
        give_item(player, "weapon_ak47")         client_print(player, print_chat, "[ZP] You bought CSO REX CV-47 60R")         g_HasAk[player] = true;
:arrow:
Code:
        new iWep = give_item(player, "weapon_ak47")         if( iWep > 0 )         {             cs_set_weapon_ammo( iWep, 30 )             cs_set_user_bpammo( id, CSW_AK47, 90 )         }         client_print(player, print_chat, "[ZP] You bought CSO REX CV-47 60R")         g_HasAk[player] = true;

jc980 05-04-2010 22:36

Re: please help on my custom clip and bpammo on my custom plugin!!!!!
 
Quote:

Originally Posted by wrecked_ (Post 1170994)
Code:
        give_item(player, "weapon_ak47")         client_print(player, print_chat, "[ZP] You bought CSO REX CV-47 60R")         g_HasAk[player] = true;
:arrow:
Code:
        new iWep = give_item(player, "weapon_ak47")         if( iWep > 0 )         {             cs_set_weapon_ammo( iWep, 30 )             cs_set_user_bpammo( id, CSW_AK47, 90 )         }         client_print(player, print_chat, "[ZP] You bought CSO REX CV-47 60R")         g_HasAk[player] = true;

thanks!

it gave me 6 compile errors it says that player, id has its undefined line 20-23 has no constant expression line 198 has no effect, expected token ; but found ), invalid expression assumed zero fatal error too many errors on one line.

wrecked_ 05-04-2010 23:01

Re: please help on my custom clip and bpammo on my custom plugin!!!!!
 
Replace id with player.

jc980 05-04-2010 23:08

Re: please help on my custom clip and bpammo on my custom plugin!!!!!
 
Quote:

Originally Posted by wrecked_ (Post 1171018)
Replace id with player.

what id it has many words that has ID

wrecked_ 05-04-2010 23:18

Re: please help on my custom clip and bpammo on my custom plugin!!!!!
 
Code:
cs_set_user_bpammo( id, CSW_AK47, 90 )

jc980 05-04-2010 23:23

Re: please help on my custom clip and bpammo on my custom plugin!!!!!
 
Quote:

Originally Posted by wrecked_ (Post 1171024)
Code:
cs_set_user_bpammo( id, CSW_AK47, 90 )

ok, that part was fixed, now two errors remain, line 20 undefined symbol "player"
line 20-23 must be a constant expression; assumed zero

wrecked_ 05-04-2010 23:28

Re: please help on my custom clip and bpammo on my custom plugin!!!!!
 
Post line 20.


All times are GMT -4. The time now is 03:47.

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