AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Store (https://forums.alliedmods.net/forumdisplay.php?f=157)
-   -   Release [ANY?] Player Size (https://forums.alliedmods.net/showthread.php?t=214945)

Franc1sco 05-01-2013 16:06

[ANY?] Player Size
 
[Store] Player Size


Description:
  • This plugin allows players to buy player size in the store for change the size of his player.
  • This plugin was private for my community but I decided to release it
Requirements:Features:
  • Customizable - You can have any amount of Player size you want, and you can customize each Player size in its attrs field.
Installation:

Download the attached store-playersize.zip archive and extract to your sourcemod folder intact. Then open your store web panel, navigate to Import/Export System under the Tools menu, and import configs/store/json-import/playersize.json

Adding more playersize:

You can use the web panel to add playersizes. Open the web panel, navigate to Add New Item under the Items menu. In type and loadout_slot, type playersize. Change name, display_name, description and attrs to customize the new playersize.

The attrs field should look like:

Code:

{
    "size": "0.6" // 1.0 is the normal size
}

Screenshots:

http://steamcommunity.com/sharedfile.../?id=136690521
http://steamcommunity.com/sharedfile.../?id=135119334
http://steamcommunity.com/sharedfile.../?id=132416999


Credits:

Jose Alberto ( https://forums.alliedmods.net/member.php?u=217457 ) for the original Idea
Me for the remainder


Download:

Main repository
Direct download
Code changes

vodka00 05-01-2013 17:10

Re: [ANY?] Player Size
 
You rock man. :)

One question though, does the size affect any other properties? Such as speed, jump height, obstacle clearance and other stuff? Or is this purely cosmetic?

Franc1sco 05-01-2013 17:21

Re: [ANY?] Player Size
 
Quote:

Originally Posted by vodka00 (Post 1943973)
You rock man. :)

One question though, does the size affect any other properties? Such as speed, jump height, obstacle clearance and other stuff? Or is this purely cosmetic?

By the plugin, affect to the damage received.

As default, your vision perspective change (lowest or highest) and also the space that you occupy (hitgroup)

vodka00 05-01-2013 17:30

Re: [ANY?] Player Size
 
Quote:

Originally Posted by Franc1sco (Post 1943979)
By the plugin, affect to the damage received.

As default, your vision perspective change (lowest or highest) and also the space that you occupy (hitgroup)

Any chance that there could be a version that changes just the size without damage, vision or hitgroups? If not that is very okay.

Franc1sco 05-01-2013 17:36

Re: [ANY?] Player Size
 
Quote:

Originally Posted by vodka00 (Post 1943983)
Any chance that there could be a version that changes just the size without damage, vision or hitgroups? If not that is very okay.

For change only the size without vision and hitgroups you need to redimension the skin (make a new skin) thing that cannot be through plugin (that I know).


However the damage I can do it, I will set a cvar for disable it.

vodka00 05-01-2013 17:37

Re: [ANY?] Player Size
 
Quote:

Originally Posted by Franc1sco (Post 1943985)
For change only the size without vision and hitgroups you need to redimension the skin (make a new skin) thing that cannot be through plugin (that I know).


Do you mean that this plugin then works on some skins only?

Franc1sco 05-01-2013 17:44

Re: [ANY?] Player Size
 
Quote:

Originally Posted by vodka00 (Post 1943986)
Do you mean that this plugin then works on some skins only?

No, this plugin works in all skins.

But for no affect to vision and hitgroup, you will need use a skin more big, or else the size will change vision and hitgroup

cREANy0 05-01-2013 20:01

Re: [ANY?] Player Size
 
I don't test it for CS:GO but i think there will be the same problem like for this Plugin:

http://forums.alliedmods.net/showthread.php?t=193255

Screens ↓ :

Spoiler


greetz cREANy0

iGANGNAM 05-02-2013 06:25

Re: [ANY?] Player Size
 
This plugin have bug who is triggering noblock trough player like another one?

Franc1sco 05-02-2013 07:02

Re: [ANY?] Player Size
 
Quote:

Originally Posted by cREANy0 (Post 1944071)
I don't test it for CS:GO but i think there will be the same problem like for this Plugin:

http://forums.alliedmods.net/showthread.php?t=193255

Screens ↓ :

Spoiler


greetz cREANy0

Quote:

Originally Posted by iGANGNAM (Post 1944284)
This plugin have bug who is triggering noblock trough player like another one?


Surely

Arrow768 05-02-2013 10:22

Re: [ANY?] Player Size
 
It would be very nice if you could have a attr for the jumpheight and the speed.
So it is possible to make smaller players faster/slower and reduce/increase the jumpheight

Psikotik 05-02-2013 17:35

Re: [ANY?] Player Size
 
His work with a menu you can change the size of the player in the script

Quote:

#include <sourcemod>
#include <morecolors>




new Taill[MAXPLAYERS+1] = 0;


public OnPluginStart()
{
HookEvent("player_spawn", PlayerSpawn);
RegAdminCmd("sm_taille", Command, ADMFLAG_CUSTOM1);
}


public Action:Command(client, args)
{
Menu(client);
}


public Action:Menu(client)
{
if(IsPlayerAlive(client))
{
new Handle:menu = INVALID_HANDLE;
menu = CreateMenu(Choix);
SetMenuTitle(menu, "Choix de votre Taille : \n ");
AddMenuItem(menu, "", "- Taille Normale");
AddMenuItem(menu, "", "- Petite Taille");
AddMenuItem(menu, "", "- Grande Taille");
SetMenuExitButton(menu, true);
DisplayMenu(menu, client, MENU_TIME_FOREVER);
}
}


public Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event,"userid") );
if (IsClientInGame(client))
{
if (Taill[client] == 0)
{
SetEntPropFloat(client, Prop_Send, "m_flModelScale", 1.0);
}
else if (Taill[client] == 1)
{
PrintHintText(client, "{cyan}[VIP]{green} Vous êtes petit (Tapez !taille)");
SetEntPropFloat(client, Prop_Send, "m_flModelScale", 0.7);
}
else if (Taill[client] == 2)
{
PrintHintText(client, "{cyan}[VIP]{green} Vous êtes grand (Tapez !taille)");
SetEntPropFloat(client, Prop_Send, "m_flModelScale", 1.3);
}
}
}


public Choix(Handle:menu, MenuAction:action, client, itemNum)
{
if ( action == MenuAction_Select )
{
switch (itemNum)
{
case 0:
{
CPrintToChat(client,"{cyan}[VIP]{green} Vous etes de taille : {lightgreen}Normale");
SetEntPropFloat(client, Prop_Send, "m_flModelScale", 1.0);
}
case 1:
{
CPrintToChat(client,"{cyan}[VIP]{green} Vous etes de taille : {lightgreen}Petite");
SetEntPropFloat(client, Prop_Send, "m_flModelScale", 0.7);
}
case 2:
{
CPrintToChat(client,"{cyan}[VIP]{green} Vous etes de taille : {lightgreen}Grande");
SetEntPropFloat(client, Prop_Send, "m_flModelScale", 1.3);
}
}
}


}

SkyK1ll 05-03-2013 13:25

Re: [ANY?] Player Size
 
Hey,

I become this Errors in the log [CSS] :

L 05/03/2013 - 19:21:54: [SMJSON] Error in line 1, col 16: '[' or '{' expected near '"{\"size\":1.7}"'
L 05/03/2013 - 19:21:54: [SM] Native "json_object_get" reported: Invalid <Object> handle 0 (error 4)
L 05/03/2013 - 19:21:54: [SM] Displaying call stack trace for plugin "store/store-playersize.smx":
L 05/03/2013 - 19:21:54: [SM] [0] Line 986, C:\Users\Usuario\Dropbox\UEA\store\include\sm jansson.inc::json_object_get_float()
L 05/03/2013 - 19:21:54: [SM] [1] Line 131, store-playersize.sp::LoadItem()

and the Server crash

can anyone help me?

vodka00 05-03-2013 14:17

Re: [ANY?] Player Size
 
Quote:

Originally Posted by SkyK1ll (Post 1945106)
Hey,

I become this Errors in the log [CSS] :

L 05/03/2013 - 19:21:54: [SMJSON] Error in line 1, col 16: '[' or '{' expected near '"{\"size\":1.7}"'
L 05/03/2013 - 19:21:54: [SM] Native "json_object_get" reported: Invalid <Object> handle 0 (error 4)
L 05/03/2013 - 19:21:54: [SM] Displaying call stack trace for plugin "store/store-playersize.smx":
L 05/03/2013 - 19:21:54: [SM] [0] Line 986, C:\Users\Usuario\Dropbox\UEA\store\include\sm jansson.inc::json_object_get_float()
L 05/03/2013 - 19:21:54: [SM] [1] Line 131, store-playersize.sp::LoadItem()

and the Server crash

can anyone help me?

I am no rocket scientist, but I think you messed up when setting up your attrs field.

L 05/03/2013 - 19:21:54: [SMJSON] Error in line 1, col 16: '[' or '{' expected near '"{\"size\":1.7}"'

This seems to be saying that it's expecting to see [ or { in the beginning of attrs near "size": 1.7

homerjsimpson 05-12-2013 17:36

Re: [ANY?] Player Size
 
Quote:

Originally Posted by vodka00 (Post 1945136)
I am no rocket scientist, but I think you messed up when setting up your attrs field.

L 05/03/2013 - 19:21:54: [SMJSON] Error in line 1, col 16: '[' or '{' expected near '"{\"size\":1.7}"'

This seems to be saying that it's expecting to see [ or { in the beginning of attrs near "size": 1.7

I'm with the same errors on my servers log... =\

Arrow768 05-13-2013 15:06

Re: [ANY?] Player Size
 
Quote:

Originally Posted by homerjsimpson (Post 1950799)
I'm with the same errors on my servers log... =\

Then you have messed up your attrs field.
Validate it with the json validator

scorpadorp 05-14-2013 17:45

Re: [ANY?] Player Size
 
Can you please do this for resizehead instead?

I imagine the changes should be minimal.

homerjsimpson 05-18-2013 13:43

Re: [ANY?] Player Size
 
Arrow768,

I validate as like you said:
http://i.imgur.com/odS1Woi.png


But I still have the same problem ... I've uninstall and install again:
Code:

L 05/18/2013 - 14:37:23: SourceMod error session started
L 05/18/2013 - 14:37:23: Info (map "ctf_turbine") (file "errors_20130518.log")
L 05/18/2013 - 14:37:23: [SMJSON] Error in line 1, col 16: '[' or '{' expected near '"{\"size\":1.2}"'
L 05/18/2013 - 14:37:23: [SM] Native "json_object_get" reported: Invalid <Object> handle 0 (error 4)
L 05/18/2013 - 14:37:23: [SM] Displaying call stack trace for plugin "store\store-playersize.smx":
L 05/18/2013 - 14:37:23: [SM]  [0]  Line 986, C:\Users\Usuario\Dropbox\UEA\store\include\smjansson.inc::json_object_get_float()
L 05/18/2013 - 14:37:23: [SM]  [1]  Line 131, store-playersize.sp::LoadItem()
L 05/18/2013 - 14:37:23: [SMJSON] Error in line 1, col 16: '[' or '{' expected near '"{\"size\":1.1}"'
L 05/18/2013 - 14:37:23: [SM] Native "json_object_get" reported: Invalid <Object> handle 0 (error 4)
L 05/18/2013 - 14:37:23: [SM] Displaying call stack trace for plugin "store\store-playersize.smx":
L 05/18/2013 - 14:37:23: [SM]  [0]  Line 986, C:\Users\Usuario\Dropbox\UEA\store\include\smjansson.inc::json_object_get_float()
L 05/18/2013 - 14:37:23: [SM]  [1]  Line 131, store-playersize.sp::LoadItem()
L 05/18/2013 - 14:37:23: [SMJSON] Error in line 1, col 16: '[' or '{' expected near '"{\"size\":0.9}"'
L 05/18/2013 - 14:37:23: [SM] Native "json_object_get" reported: Invalid <Object> handle 0 (error 4)
L 05/18/2013 - 14:37:23: [SM] Displaying call stack trace for plugin "store\store-playersize.smx":
L 05/18/2013 - 14:37:23: [SM]  [0]  Line 986, C:\Users\Usuario\Dropbox\UEA\store\include\smjansson.inc::json_object_get_float()
L 05/18/2013 - 14:37:23: [SM]  [1]  Line 131, store-playersize.sp::LoadItem()
L 05/18/2013 - 14:37:23: [SMJSON] Error in line 1, col 16: '[' or '{' expected near '"{\"size\":0.8}"'
L 05/18/2013 - 14:37:23: [SM] Native "json_object_get" reported: Invalid <Object> handle 0 (error 4)
L 05/18/2013 - 14:37:23: [SM] Displaying call stack trace for plugin "store\store-playersize.smx":
L 05/18/2013 - 14:37:23: [SM]  [0]  Line 986, C:\Users\Usuario\Dropbox\UEA\store\include\smjansson.inc::json_object_get_float()
L 05/18/2013 - 14:37:23: [SM]  [1]  Line 131, store-playersize.sp::LoadItem()
L 05/18/2013 - 14:37:23: [SMJSON] Error in line 1, col 16: '[' or '{' expected near '"{\"size\":0.6}"'
L 05/18/2013 - 14:37:23: [SM] Native "json_object_get" reported: Invalid <Object> handle 0 (error 4)
L 05/18/2013 - 14:37:23: [SM] Displaying call stack trace for plugin "store\store-playersize.smx":
L 05/18/2013 - 14:37:23: [SM]  [0]  Line 986, C:\Users\Usuario\Dropbox\UEA\store\include\smjansson.inc::json_object_get_float()
L 05/18/2013 - 14:37:23: [SM]  [1]  Line 131, store-playersize.sp::LoadItem()
L 05/18/2013 - 14:37:23: [SMJSON] Error in line 1, col 16: '[' or '{' expected near '"{\"size\":1.7}"'
L 05/18/2013 - 14:37:23: [SM] Native "json_object_get" reported: Invalid <Object> handle 0 (error 4)
L 05/18/2013 - 14:37:23: [SM] Displaying call stack trace for plugin "store\store-playersize.smx":
L 05/18/2013 - 14:37:23: [SM]  [0]  Line 986, C:\Users\Usuario\Dropbox\UEA\store\include\smjansson.inc::json_object_get_float()
L 05/18/2013 - 14:37:23: [SM]  [1]  Line 131, store-playersize.sp::LoadItem()

=\

vodka00 05-18-2013 15:12

Re: [ANY?] Player Size
 
Quote:

Originally Posted by scorpadorp (Post 1952054)
Can you please do this for resizehead instead?

I imagine the changes should be minimal.

This would only work for TF2 afaik.

Arrow768 05-19-2013 04:56

Re: [ANY?] Player Size
 
@homerjsimpson
Quote:

Originally Posted by Arrow768 (Post 1951307)
Then you have messed up your attrs field.
Validate it with the json validator

You have not validated your attrs field, you have validated the json that you have imported into the webpanel ?
Validate every attrs field (of every item), and it should work.

homerjsimpson 05-19-2013 11:53

Re: [ANY?] Player Size
 
Arrow,

I don't know so much about json ... But after I import the file into the webpanel, the settings of itens show up that:


Can be problem with the Attributes ? How I can fix this !?


Regards

SlackersUnited 06-06-2013 14:49

Re: [ANY?] Player Size
 
Quote:

Originally Posted by homerjsimpson (Post 1954529)
Arrow,

I don't know so much about json ... But after I import the file into the webpanel, the settings of itens show up that:


Can be problem with the Attributes ? How I can fix this !?


Regards

Change it to look like this

{
"size": "0.6" // 1.0 is the normal size
}

Arrow768 06-07-2013 16:49

Re: [ANY?] Player Size
 
That should work; If not post a support request on jira

homerjsimpson 08-18-2013 08:36

Re: [ANY?] Player Size
 
I changed the attributes like that:
{
"size": "0.6"
}


And nothing happens. The player's size still the same and also not create any error in the file log. =\

This script: https://forums.alliedmods.net/showthread.php?t=193255 need to be running?

I've tried with and without the [ANY] Resize Players - 1.4.0, but not work too !!! =\

Franc1sco 08-18-2013 16:54

Re: [ANY?] Player Size
 
Quote:

Originally Posted by homerjsimpson (Post 2016169)
I changed the attributes like that:
{
"size": "0.6"
}


And nothing happens. The player's size still the same and also not create any error in the file log. =\

This script: https://forums.alliedmods.net/showthread.php?t=193255 need to be running?

I've tried with and without the [ANY] Resize Players - 1.4.0, but not work too !!! =\

In what game?

homerjsimpson 08-18-2013 17:12

Re: [ANY?] Player Size
 
Quote:

Originally Posted by Franc1sco (Post 2016595)
In what game?

Ohh sorry ... In CS:Source

Hurrican 08-27-2013 15:54

Re: [ANY?] Player Size
 
This is really buggy.... If you bought this and equipped it, you're inside the ground.... halfway.. it sucks..

Franc1sco 08-27-2013 21:17

Re: [ANY?] Player Size
 
Maybe will be for a update of CS:S

when I was in my server worked perfectly, I will test it when I have time

Also if someone wants to show me a server error, He can tell me by steam

FrozenHaxor 10-27-2013 10:19

Re: [ANY?] Player Size
 
It resizes the player only one time, while using the menu.
When player dies and respawns, theres a shake of the screen after about 1 second of respawn and the player does not change his size, however the damage is being scaled.

This glitch is very abusive, players pick the biggest resize there is, and become less vulnerable to damage while keeping the normal player size after respawn!


----

Quick and dirty fix that seems to fix the issue completely:
Quote:

CreateTimer(0.5, GiveItem, GetClientSerial(client));
CreateTimer(1.0, GiveItem, GetClientSerial(client));
CreateTimer(1.5, GiveItem, GetClientSerial(client));

janpepu 02-02-2014 08:57

Re: [ANY?] Player Size
 
Hi,

In the store i have set 30 seconds in "Expiry time (in seconds)"

After 30 seconds user don't see the item in the inventory but he don't resize to normal.

Is it a store problem ?

Arrow768 02-02-2014 16:51

Re: [ANY?] Player Size
 
Thats how its meant to work.
The item is removed after the expiry time from the inventory.
If you want that the player gets restored to his original size you have to add a timer to the plugin that restores him to his original size (you could add this as a json parameter so you can modify it easier).
(You might also want to set the expiry time to 0 and remove the item after the user has used the item).

janpepu 02-02-2014 17:17

Re: [ANY?] Player Size
 
I have set the expiry time to 0 but don't take the normal size after the end of the round.
Have you a example to add the possibility to remove the item to the user after remove to the store ?
thanks

Nysho 01-22-2015 04:23

Re: [ANY?] Player Size
 
not working for me too, the character is STUCK inside the ground.
Tried numbers with decimal and no decimal and still same..

alex0310 01-29-2017 14:29

Re: [ANY?] Player Size
 
Quote:

Originally Posted by Nysho (Post 2252244)
not working for me too, the character is STUCK inside the ground.
Tried numbers with decimal and no decimal and still same..

The attrs field must look like:
Code:

{   
 "size": 0.6 
}


[email protected] 05-31-2017 06:08

Re: [ANY?] Player Size
 
Thanks for an excellent plugin !! I have added 2 more sizes namely Deity at 3.0 and Tomb Thumb at 0.2

Just a note that initially I found that my player just kept dying in spawn immediately. When investigating the attributes I found more double quotes and escape character backslashes than expected. Basically it looked like this:

"{\"size\":0.2}"

and I change it to look like this

{"size":0.2}

Then it worked fine.

paulo_crash 11-05-2018 12:25

Re: [ANY?] Player Size
 
Would it be possible to make this plugin compatible with the Plugin Store by Zephyrus?


All times are GMT -4. The time now is 20:41.

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