Raised This Month: $12 Target: $400
 3% 

Release [ANY?] Player Size


Post New Thread Reply   
 
Thread Tools Display Modes
Arrow768
Veteran Member
Join Date: Nov 2011
Location: Austria
Old 05-02-2013 , 10:22   Re: [ANY?] Player Size
Reply With Quote #11

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
__________________

Last edited by Arrow768; 05-02-2013 at 10:22.
Arrow768 is offline
Psikotik
Member
Join Date: May 2013
Old 05-02-2013 , 17:35   Re: [ANY?] Player Size
Reply With Quote #12

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 ActionlayerSpawn(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);
}
}
}


}
Psikotik is offline
SkyK1ll
Junior Member
Join Date: Feb 2012
Old 05-03-2013 , 13:25   Re: [ANY?] Player Size
Reply With Quote #13

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?
SkyK1ll is offline
vodka00
Veteran Member
Join Date: Jun 2012
Location: Los Angeles
Old 05-03-2013 , 14:17   Re: [ANY?] Player Size
Reply With Quote #14

Quote:
Originally Posted by SkyK1ll View Post
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
__________________
cw main:

cw speedruns:
vodka00 is offline
homerjsimpson
BANNED
Join Date: Feb 2009
Location: https://t.me/pump_upp
Old 05-12-2013 , 17:36   Re: [ANY?] Player Size
Reply With Quote #15

Quote:
Originally Posted by vodka00 View Post
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... =\
homerjsimpson is offline
Send a message via ICQ to homerjsimpson Send a message via AIM to homerjsimpson Send a message via Yahoo to homerjsimpson Send a message via Skype™ to homerjsimpson
Arrow768
Veteran Member
Join Date: Nov 2011
Location: Austria
Old 05-13-2013 , 15:06   Re: [ANY?] Player Size
Reply With Quote #16

Quote:
Originally Posted by homerjsimpson View Post
I'm with the same errors on my servers log... =\
Then you have messed up your attrs field.
Validate it with the json validator
__________________
Arrow768 is offline
scorpadorp
SourceMod Donor
Join Date: May 2012
Location: NC
Old 05-14-2013 , 17:45   Re: [ANY?] Player Size
Reply With Quote #17

Can you please do this for resizehead instead?

I imagine the changes should be minimal.
scorpadorp is offline
homerjsimpson
BANNED
Join Date: Feb 2009
Location: https://t.me/pump_upp
Old 05-18-2013 , 13:43   Re: [ANY?] Player Size
Reply With Quote #18

Arrow768,

I validate as like you said:



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()
=\
homerjsimpson is offline
Send a message via ICQ to homerjsimpson Send a message via AIM to homerjsimpson Send a message via Yahoo to homerjsimpson Send a message via Skype™ to homerjsimpson
vodka00
Veteran Member
Join Date: Jun 2012
Location: Los Angeles
Old 05-18-2013 , 15:12   Re: [ANY?] Player Size
Reply With Quote #19

Quote:
Originally Posted by scorpadorp View Post
Can you please do this for resizehead instead?

I imagine the changes should be minimal.
This would only work for TF2 afaik.
__________________
cw main:

cw speedruns:
vodka00 is offline
Arrow768
Veteran Member
Join Date: Nov 2011
Location: Austria
Old 05-19-2013 , 04:56   Re: [ANY?] Player Size
Reply With Quote #20

@homerjsimpson
Quote:
Originally Posted by Arrow768 View Post
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.
__________________

Last edited by Arrow768; 05-19-2013 at 04:58.
Arrow768 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:32.


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