Crap head if u still read this, I use the old pointmod (Lot less buggy and simple). I am trying to make it so if you die you lose a point I got [lua]hook.Add( "DoPlayerDeath", "RemovePoints", function( ply, attacker )
if ValidEntity( attacker ) and ply:IsPlayer() then
ply:TakePoints( 1 )
end
end )[/lua]
I also have a script where if you kill you get 2 points so when someone types kill in console they get 1 point. You know how to fix it?
[QUOTE=TheDertyHobo;27980586]Crap head if u still read this, I use the old pointmod (Lot less buggy and simple). I am trying to make it so if you die you lose a point I got [lua]hook.Add( "DoPlayerDeath", "RemovePoints", function( ply, attacker )
if ValidEntity( attacker ) and ply:IsPlayer() then
ply:TakePoints( 1 )
end
end )[/lua]
I also have a script where if you kill you get 2 points so when someone types kill in console they get 1 point. You know how to fix it?[/QUOTE]
This is the script I use for my gamemode for giving points if you kill a player, and you don't get points for killing yourself.
[lua]
hook.Add( "PlayerDeath", "PlyDeath", function( victim, weapon, killer )
if killer:GetName() == victim:GetName() then
return;
elseif killer:IsPlayer() then
killer:PS_GivePoints(2)
end
end)
[/lua]
Should work. And for taking points when a player dies -
[lua]
hook.Add( "PlayerDeath", "TakePoints", function( victim, weapon, killer )
if victim:GetName() == killer:GetName() then
return;
elseif ValidEntity( killer ) then
victim:PS_TakePoints(1)
end
end)
[/lua]
Didn't test, but should work.
[QUOTE=TheDertyHobo;27980586]I also have a script where if you kill you get 2 points so when someone types kill in console they get 1 point. You know how to fix it?[/QUOTE]
What do you mean? You have something where when a guy kills another guy, the killer gets 2 points. But when someone types kill in console they get 2 points aswell. Use the code bellow to fix this. Eventho it shuld be in pointshop by default.
[QUOTE=DreBly;27982557]This is the script I use for my gamemode for giving points if you kill a player, and you don't get points for killing yourself.
[lua]
hook.Add( "PlayerDeath", "PlyDeath", function( victim, weapon, killer )
if killer:GetName() == victim:GetName() then
return;
elseif killer:IsPlayer() then
killer:PS_GivePoints(2)
end
end)
[/lua]
Should work. And for taking points when a player dies -
[lua]
hook.Add( "PlayerDeath", "TakePoints", function( victim, weapon, killer )
if victim:GetName() == killer:GetName() then
return;
elseif ValidEntity( killer ) then
victim:PS_TakePoints(1)
end
end)
[/lua]
Didn't test, but should work.[/QUOTE]
PointShop already has one of these codes.
[lua]
hook.Add("PlayerDeath", "PointShop_PlayerDeath", function(victim, inflictor, attacker)
if attacker:IsPlayer() and attacker:IsValid() and not victim == attacker then
attacker:PS_GivePoints(10, "killed " .. victim:Nick())
end
end)
[/lua]
It gives the killer 10 points when killing another player. (Located at sv_pointshop if you use rev 66 or is it 61? I dont rememeber.)
Actually I found one method out and its simple added [lua] and attacker != ply then [/lua] but thanks for helping guys
Hello,
First I'd like to say this addon is really awesome ;).
But I was looking for help with an issue.
Apperently some Player models have the "head bone" at a lower height in comparisson to other player models.
Here's an example with the exact some Hat but on different player models.
[img]http://img443.imageshack.us/img443/2498/testlcg.jpg[/img]
Maybe some1 can help me with this ?
------
Also
I noticed that the PointShop Points are beeing saved, but the actual items aren't beeing saved to a players inventory (atleast on a listen server). Is there a way to solve this aswell ?
------
Eh found some other problems ( not shure if they were discuessed already in this thread though )
On a Live Dedicated Server only 1 user can have a hat a time. If a user has a hat and another tries to purchase a hat, he will get the message "[PS] You can only have 1 items from the Hats, Heads and Masks category!"
which means players are sharing inventorys.
------
Also as stated above,
some users get the error message:
[lua][cl_pointshop.lua:166] attempt to index field '_Hats' (a nil value)[/lua]
and these will not be able to see any hats while in the server.
bump :S
[QUOTE=Kazak1;28053415]Hello,
I noticed that the PointShop Points are beeing saved, but the actual items aren't beeing saved to a players inventory (atleast on a listen server). Is there a way to solve this aswell ?
------
Eh found some other problems ( not shure if they were discuessed already in this thread though )
On a Live Dedicated Server only 1 user can have a hat a time. If a user has a hat and another tries to purchase a hat, he will get the message "[PS] You can only have 1 items from the Hats, Heads and Masks category!"
which means players are sharing inventorys.
------
Also as stated above,
some users get the error message:
[lua][cl_pointshop.lua:166] attempt to index field '_Hats' (a nil value)[/lua]
and these will not be able to see any hats while in the server.[/QUOTE]
Downgrade your pointshop to REV 61. That shuld fix the quoted problems. Dont know about the hat issue though :/
Downgrade methode:
1. Right click your folder.
2. Press TortoiseSVN and then press "Update to revision".
3. You will have a window appearing and you simply typee in 61.
[QUOTE=Crap-Head;28105151]Downgrade your pointshop to REV 61. That shuld fix the quoted problems. Dont know about the hat issue though :/
Downgrade methode:
1. Right click your folder.
2. Press TortoiseSVN and then press "Update to revision".
3. You will have a window appearing and you simply typee in 61.[/QUOTE]
I've actually tried out the REV 61, but I noticed there were a couple of problems, like the hat model not beeing drawn as good as in the latest version ( it spazzes out ) and the the hat not showing up on the players head, the moment u buy it, meaning u have to respawn in order to see it ( this might be easly fixed, dunno..)
[QUOTE=Kazak1;28105713]I've actually tried out the REV 61, but I noticed there were a couple of problems, like the hat model not beeing drawn as good as in the latest version ( it spazzes out ) and the the hat not showing up on the players head, the moment u buy it, meaning u have to respawn in order to see it ( this might be easly fixable dunno..)[/QUOTE]
The hat only spazzes out in singleplayer. Not in multiplayer.
Also about the respawn thingy. Yea i know, its sorta annoying that you have to respawn in order to see your new hat, or the trail you just bought. But hey, il rather respawn than not being able to buy anything or saving overriding eachother. Il try and see if i can fix the "respawn to see your hat" problem.
I'm on holiday at the moment, but when I get back, I'll be doing a major overhaul to fix all the bugs and add a few additional features, courtesy of Entoros!
Hope the update is nice, I've been using the old PointMod til someone would fix PointShop
[QUOTE=_Undefined;28125307]I'm on holiday at the moment, but when I get back, I'll be doing a major overhaul to fix all the bugs and add a few additional features, courtesy of Entoros![/QUOTE]
Awersome ^^ great job btw!
i. love. you.
[b]Update is out![/b]
Added NPC sellers (see config).
Added rest of HL2 weapons.
Fixed bugs.
Let me know if you have any problems or experience any bugs.
:love:
[editline]26th February 2011[/editline]
Singleplayer, you so crazy.
[code]Hook 'PointShop_tvhead_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_turtlehat_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_buckethat_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_skullhead_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_melonhead_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_rightlowerlegarmor_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_backpack_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_headcrabhat_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_leftupperarmarmor_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_rightupperarmarmor_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_conehat_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_monitorhead_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_rightlowerarmarmor_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_clockmask_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_leftlowerarmarmor_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_snowmanhead_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_spotlighthead_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_panhat_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_leftlowerlegarmor_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_afro_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_noentrymask_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_lampshadehat_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_bombhead_PlayerInitialSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_loltrail_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_physgun_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_gravgun_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_crowbar_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_armor100_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_lovetrail_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_lowgravity_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_pistol_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_rpg_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_ar2_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_crossbow_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_grenade_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_plasmatrail_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_357_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_health100_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_superspeed_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_smg_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_classiczombie_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_shotgun_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
Hook 'PointShop_kleiner_PlayerSpawn' Failed: [@lua\includes\extensions\table.lua:103] bad argument #1 to 'pairs' (table expected, got nil)
[/code]
Working on it.
[editline]26th February 2011[/editline]
Fixed. You won't be given items in your inventory in Singleplayer when you first spawn.
Thanks :buddy:
I guess you already know about this cause u posted about it on the Questions megathread.
[img]http://img600.imageshack.us/img600/5493/dblmodel.jpg[/img]
dunno if your read my reply.
from PAC2:
[quote]
- When using the editor, the local player needs to be drawn only when rendering the preview
- Now it's drawing the effects and stuff two times - for the preview and the world
- We need to fix that somehow
- Implement a hooking system so gamemodes can integrate (maybe)
- Would allow people to 'buy' things in gamemodes
- Provide a more friendly version of data (maybe.. probably not)
- GLON is good for storage.. but these configs are going to be a community thing, so the config needs to be readable
- Perhaps JSON
- Implement a better system for converting descriptive bone names into unfriendly bone names (maybe)
- Certain models may have special bones (I know you want to use this with a furry model)
- Certain gamemodes may use custom player models and custom animation hooks
- Could we 'hack' into the bone animation hooks and grab the names of the bones?
- Think of more things to do
- Optimization
- Make use of DrawModel for parts and set the parts to NoDraw on init. I mean, draw the models when needed in PostPlayerDraw
[/quote]
i think i found a bug i buyed a weapon then exit the game then enter again on the same map and now i can only choose the weapons cantegory the rest doesnt appear
Map name, what's in inventory, did you use the NPC?
map name gm_flatgrass in my inventory i only had the left armour thing and yes i used the npc
Items are beeing saved on the inventory, but if a player rejoins the model won't be seen
[QUOTE=werewolf0020;28320349]map name gm_flatgrass in my inventory i only had the left armour thing and yes i used the npc[/QUOTE]
The NPC only sells weapons. Edit the config to make it otherwise.
[QUOTE=Kazak1;28320790]Items are beeing saved on the inventory, but if a player rejoins the model won't be seen[/QUOTE]
Singleplayer or multiplayer?
Undefined, have you encountered the issue that happens when you hit a player, the hat/mask stays behind him for a fraction of seconds then returns back in place, if so, how did you fix it? (if you managed to)
[QUOTE=_Undefined;28320839]The NPC only sells weapons. Edit the config to make it otherwise.
Singleplayer or multiplayer?[/QUOTE]
not dedi server, just Listen Server ( click Create Multiplayer Server )
[QUOTE=Kazak1;28321148]not dedi server, just Listen Server ( click Create Multiplayer Server )[/QUOTE]
It's because the hooks are being created a second after the server starts, and you spawn before that on a Listen server.
It's it possible to turn off a players items in lua for say... Ttt's disguiser, so you can turn off the items masks / hats from showing until you turn the disguiser off, in which ofcourse the hats/masks should appear again. - ?
appareantly ply:ps_givepoints stopped of working with me since i get function arguments expected error
im using the following code
function RegPlyHeadshots (victim, attacker, dmginfo)
if victim:LastHitGroup () == 1 then
print ("HeadShot")
attacker:ps_givepoints 50
end
end
[QUOTE=werewolf0020;28330104]appareantly ply:ps_givepoints stopped of working with me since i get function arguments expected error[/QUOTE]
[QUOTE=werewolf0020;28332923]im using the following code
function RegPlyHeadshots (victim, attacker, dmginfo)
if victim:LastHitGroup () == 1 then
print ("HeadShot")
attacker:ps_givepoints 50
end
end[/QUOTE]
How about giving that function the argument it's expecting then?
[lua]ply:PS_GivePoints(50)[/lua]
Go read [url=http://www.lua.org/pil/]this[/url], you obviously don't know lua.
Sorry, you need to Log In to post a reply to this thread.