Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


  Show Posts
Pages: 1 ... 5 6 [7] 8 9
91  Scripting / Script Help / Re: i have a problem on: September 20, 2014, 10:04:45 am
From my server.

Code: [Select]
function onPlayerSpawn(p,s)
{
p.SetWeapon(4,750);
return 1;
}
92  Scripting / Script Help / Re: i have a problem on: September 20, 2014, 09:53:58 am
Code: [Select]
function onPlayerSpawn( pPlayer )
to

Code: [Select]
function onPlayerSpawn( pPlayer, spawn )
93  Scripting / Script Help / Re: /healall help on: September 20, 2014, 09:50:33 am
I haven't used a for loop to get players in a long time. Is there a preceding "i" variable somewhere in your command script? The locals say you have two, one is NULL and the other is 1.

A bit off topic, but it might help:
Instead of looping through the maximum players, why don't you just create a table, and store all the players in that?

Here is what I use when scripting:
Code: [Select]
function onScriptLoad( )
{
Players <- { };
}

function onPlayerConnect( player )
{
Players[ player.ID ] <- player;
}

function onPlayerPart( player , reason )
{
Players[ player.ID ] <- null;
}

THEN, when you need to grab all the players and set health, you just loop through the table:
Code: [Select]
foreach( ii , iv in Players )
{
iv.Health = 100;
}

This code works ;) Thanks
94  Scripting / Script Help / Re: i have a problem on: September 20, 2014, 09:33:36 am
You forgot a pPlayer ;)

Code: [Select]
function onPlayerSpawn( pPlayer )
{
pPlayer.SetWeapon( 4, 25000 );
}
95  Scripting / Script Help / Re: /healall help on: September 18, 2014, 06:37:33 pm
Now what? I need this command for events etc...
96  Scripting / Script Help / Re: /healall help on: September 16, 2014, 04:11:46 pm
You're trying to set an integer instead of float, so maybe try:
Code: [Select]
plrs.Health = 100.0;

The same error.
Code: [Select]
...
AN ERROR HAS OCCURED [trying to set 'integer']
...

++

In VCMP 0.4 script working properly, so I think the error is in the code LU (with health and armour).

97  Scripting / Script Help / Re: /healall help on: September 15, 2014, 06:11:09 pm
/healall problem is back

Error
Code: [Select]
AN ERROR HAS OCCURED [trying to set 'integer']
<15/09/2014 - 18:01:34>
CALLSTACK
<15/09/2014 - 18:01:34> *FUNCTION [onPlayerCommand()] Scripts/0xSkrypt/0x844411.nut line [2547]
<15/09/2014 - 18:01:34>
LOCALS
<15/09/2014 - 18:01:34> [plrs] 1
<15/09/2014 - 18:01:34> [i] 1
<15/09/2014 - 18:01:34> [veh] NULL
<15/09/2014 - 18:01:34> [i] NULL
<15/09/2014 - 18:01:34> [plr] INSTANCE
<15/09/2014 - 18:01:34> [c] "healall"
<15/09/2014 - 18:01:34> [temp] NULL
<15/09/2014 - 18:01:34> [t] NULL
<15/09/2014 - 18:01:34> [c] "healall"
<15/09/2014 - 18:01:34> [p] INSTANCE
<15/09/2014 - 18:01:34> [this] TABLE

Command:
Code: [Select]
else if (c == "healall")
{
if (IsNoob(p,c)) return 0;
else
{
Message("*** "+p.Name+" uzdrowil wszystkich na serwerze!",255,0,80);
for(local i = 0; i <= GetMaxPlayers(); i++)
{
local plrs = FindPlayer(i);
if(plrs) plrs.Health = 100;
}
}
}

The error is in this line:
Code: [Select]
plrs.Health = 100;
This is another command that works without a problem.

Code: [Select]
else if (c == "disarmall")
{
if (IsNoob(p,c)) return 0;
else
{
Message("*** "+p.Name+" rozbroil wszystkich graczy na serwerze!",255,0,80);
for(local i = 0; i <= GetMaxPlayers(); i++)
{
local plrs = FindPlayer(i);
if(plrs) plrs.ClearWeapons();
}
}
}

Not know how solve it; x
98  News and Content / Updates/Changes / Re: Update 0.1.0.16 (06/08/14) on: September 14, 2014, 01:09:10 pm
Okay, maybe I exaggerated a bit...

I return to the question: "Will be even 0.1.0.17 this year with some fix?"

++

- Sometimes when i change skin, i have a freeze
99  News and Content / Updates/Changes / Re: Update 0.1.0.16 (06/08/14) on: September 14, 2014, 11:03:00 am
Will be even 0.1.0.17 this year with some fix?

Such as
- Load weapons.dat from server
- Some bugs in browser
- Object  destroy by explode and shot
- Object reconnect bug

And add:
- Load timecyc.dat, default.ide (for wheels size etc...) from server
- Carcols.dat add for 'vehicle.color' function
- Add new leave constant 'PARTREASON_RECONNECT'

Some of the things you would have done even in two minutes...

Sorry for my bad english...
100  Scripting / Script Help / Re: How to disable quit message and add my message? on: September 12, 2014, 05:45:07 pm
ok thanks ;)
101  Scripting / Script Help / How to disable quit message and add my message? on: September 11, 2014, 09:10:46 pm
I have a question. How to disable the standard messages leave the server, and adding their own like a gta-cz server.
102  Liberty Unleashed / Support / Re: SetWeaponData and weapon.dat doesn't work on: August 27, 2014, 07:40:04 pm
-- bla bla bla, text --

For me works

Ok, i had a small mistake in my /setalpha command and fixed it ;)
103  Liberty Unleashed / Support / Re: SetWeaponData and weapon.dat doesn't work on: August 27, 2014, 06:59:48 pm
I did not get a confirmation e-mail.

And next bug

player.Alpha also did not work.

Alpha works with many skins (not ID 0, 122...)
In confirmation email, click in 'Re-send' or lost password

Ok, alpha works, but I can't restore normal alpha level.

As for Mantis, this did not help.

The default level is 255

I know. Only gave a value of 0 and then as I change for example. 255, nothing happened.
104  Liberty Unleashed / Support / Re: SetWeaponData and weapon.dat doesn't work on: August 27, 2014, 06:17:16 pm
I did not get a confirmation e-mail.

And next bug

player.Alpha also did not work.

Alpha works with many skins (not ID 0, 122...)
In confirmation email, click in 'Re-send' or lost password

Ok, alpha works, but I can't restore normal alpha level.

As for Mantis, this did not help.
105  Liberty Unleashed / Support / Re: SetWeaponData and weapon.dat doesn't work on: August 27, 2014, 02:00:54 pm
I did not get a confirmation e-mail.

And next bug

player.Alpha also did not work.
Pages: 1 ... 5 6 [7] 8 9
© Liberty Unleashed Team.