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)

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.


All times are GMT -4. The time now is 22:52.

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