Show Posts
|
Pages: 1 ... 5 6 [7] 8 9
|
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:
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:
foreach( ii , iv in Players ) { iv.Health = 100; }
This code works Thanks
|
|
|
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:
plrs.Health = 100.0; The same error. ... 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
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:
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:
plrs.Health = 100; This is another command that works without a problem.
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
|
|
|
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...
|
|
|
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.
|
|
|
|