English Flare!

17 replies
Goto Page
To the start Previous 1 Next To the start
12.07.14 09:33:53 am
Up
M0BSTAZ
User
Offline Off
hi everyone!!

I make flare with item, then if you buy the flare, drop in to the floor then if you claim and press inventory then The name of flare has been change like this HP [250] and [Turbo Speed] then when equip HP [250] then set health then if equip [Turbo Speed] then set speed 200...

I have error of this script! when i open my console nothing errors appears, but no Hooks on console...

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ITEMs = {
 [1] = {equip="54",speed="250"},
}



ITEMs[1].func = function(id,speed)
parse("equip '..id..' '..equip..'")
parse("speedmod '..id..' '..speed..'")
end


addhook("spawn","staff_spawn")
function staff_spawn(id,item)
 parse('spawnitem '..equip..' '..player(id,'tilex')..' '..player(id,'tiley'))
end


I hope you help me
Thank you
Like this file --» file File does not exist (14802) file cs2d AWP2D MOD 4.0 [English Version] (4) file cs2d zm_Tower Defense v.1.3 (0) «--
12.07.14 11:22:10 am
Up
Danilwra
User
Offline Off
×
edited 1×, last 29.05.19 12:42:07 pm
Da Ny
12.07.14 11:37:17 am
Up
AlcatrazZ
BANNED
Offline Off
I don't understand this shit. Whats inventory?!
Ban Reason: Multiple Accounts
12.07.14 12:59:38 pm
Up
TrialAndError
User
Offline Off
@user Danilwra: That was... not so necessary.

@user M0BSTAZ: Talk more.
12.07.14 01:20:14 pm
Up
Rainoth
Moderator
Offline Off
You might want to change the title of your thread. "Flare!" does not say that you're trying to make a script which utilizes flare weapon.
I have no idea what you were trying to say. Anyways, I changed few parts, maybe it'll help you make whatever you're making.
Please note that Max speed value is 100
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
ITEMs = {
 [1] = {equip=54,speed=25}
          }

ITEMs[1].func = function(id)
     parse("equip "..id.." "..ITEMs[1].equip)
     parse("speedmod "..id.." "..ITEMs[1].speed)
end


addhook("spawn","staff_spawn")
function staff_spawn(id)
     parse('spawnitem '..ITEMs[1].equip..' '..player(id,'tilex')..' '..player(id,'tiley'))
end


@user AlcatrazZ: If you don't understand then don't reply as it serves no purpose (and may be considered spam)
MAL • DeviantArt • For Wallpaper Engine users • Check YT for playlists... •
12.07.14 08:59:06 pm
Up
Danilwra
User
Offline Off
×
edited 1×, last 29.05.19 12:42:48 pm
Da Ny
13.07.14 03:34:01 am
Up
M0BSTAZ
User
Offline Off
not work! when i buy speed no drop flare!
Like this file --» file File does not exist (14802) file cs2d AWP2D MOD 4.0 [English Version] (4) file cs2d zm_Tower Defense v.1.3 (0) «--
13.07.14 04:51:20 am
Up
Danilwra
User
Offline Off
×
edited 2×, last 29.05.19 12:42:54 pm
Da Ny
13.07.14 12:23:45 pm
Up
M0BSTAZ
User
Offline Off
i don't understand your language.. F**k!

EDIT: No work! if i spawn then drop flare then when i press F2 no Inventory menu!!
Like this file --» file File does not exist (14802) file cs2d AWP2D MOD 4.0 [English Version] (4) file cs2d zm_Tower Defense v.1.3 (0) «--
13.07.14 12:50:32 pm
Up
AlcatrazZ
BANNED
Offline Off
@user M0BSTAZ: why you want to custom inventory using menu if you already have a default inventory installed into cs2d.
-.- you have a flare in hand and in inventory, and when you drop this, item from custom inventory will removed. OMG why you need this sh*t?!
Ban Reason: Multiple Accounts
14.07.14 12:09:53 pm
Up
M0BSTAZ
User
Offline Off
I have a project!
Like this file --» file File does not exist (14802) file cs2d AWP2D MOD 4.0 [English Version] (4) file cs2d zm_Tower Defense v.1.3 (0) «--
15.07.14 03:23:36 am
Up
Myzz
User
Offline Off
Maybe this work.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
ITEMs = {
 [1] = {equip=54,speed=25}
          }

ITEMs[1].func = function(id)
     parse("equip "..id.." "..ITEMs[1].equip)
     parse("speedmod "..id.." "..ITEMs[1].speed)
end


addhook("spawn","staff_spawn")
function staff_spawn(id)
     parse('spawnitem '..ITEMs[1].equip..' '..player(id,'tilex')..' '..player(id,'tiley'))
end

Admin/mod comment:

Copying user Rainoth's code character by character and claiming you're helping isn't acceptable. You have been warned. /Engi
15.07.14 03:33:06 am
Up
M0BSTAZ
User
Offline Off
dude you copy raining mamoths says!! not work
Like this file --» file File does not exist (14802) file cs2d AWP2D MOD 4.0 [English Version] (4) file cs2d zm_Tower Defense v.1.3 (0) «--
15.07.14 03:39:32 am
Up
Myzz
User
Offline Off
No, I don't copy, It's equal nothing more.
15.07.14 08:47:05 am
Up
EngiN33R
Moderator
Offline Off
Seriously, we cannot help you properly if you don't give us more information. What in God's name do you want? When a flare is dropped and picked up again, you want the player to get a choice whether to get speed or health? You need to explain this coherently and clearly.
I code, therefore I exist. | Visit my blog for Lua tips and other interesting info
15.07.14 09:13:15 am
Up
Cs2dTunisie
GAME BANNED
Offline Off
I know what he need exacly.He wants to make Amstria lua.
he only need 1 exemple flare.


He need a good Inventory and he wants flares

Flare Type 1:Turbo Flare
Flare Type 2:HP flare
Flare Type 3:....

thats all
edited 1×, last 17.07.14 10:55:12 am
Lel
18.07.14 12:35:55 pm
Up
M0BSTAZ
User
Offline Off
yes!! you have a exactly what i mean :D!!
Like this file --» file File does not exist (14802) file cs2d AWP2D MOD 4.0 [English Version] (4) file cs2d zm_Tower Defense v.1.3 (0) «--
19.07.14 05:35:41 pm
Up
r4ndxm
User
Offline Off
Ehm.

user M0BSTAZ has written:
I have error of this script! when i open my console nothing errors appears, but no Hooks on console...


Wait, what the hell, that's impossible, there must be atleast errors or hooks in the console. Not enough info or you just don't know how to run the script.
Worst player ever
To the start Previous 1 Next To the start