Show Posts
|
Pages: [1] 2
|
1
|
Scripting / Script Snippets / [Client] Nickname hider script
|
on: December 06, 2015, 07:08:55 pm
|
This is client-side script. StatusNickNameHider <- true;
function onScriptLoad() BindKey(KEY_F1,BINDTYPE_UP,"NickNameHider");
function NickNameHider() { if (!StatusNickNameHider) { SetNametagDrawDistance(100.0); StatusNickNameHider = true; } else { SetNametagDrawDistance(0.0); StatusNickNameHider = false; } }
Thanks for Theremin for example function SetNametagDrawDistance.
|
|
|
3
|
Scripting / Script Help / NewTimer("KickPlayer"... problem in onPlayerConnect
|
on: November 29, 2015, 07:06:32 pm
|
I have small problem with script. So, when i use such KickPlayer(player); in event onPlayerConnect after some Messages, often Messages are cut. But when i use NewTimer("KickPlayer",125,1,player); after connect on the server, server has crashed. I try NewTimer("TestKick",125,1,player); and lower add function TestKick(player) KickPlayer(player); , but the same effect.
|
|
|
5
|
Scripting / Script Snippets / Anti SpawnKill by rwwpl
|
on: August 11, 2015, 10:20:47 pm
|
This is clientside script:
AntiSpawnKill <- false;
function onClientSpawn(s) { AntiSpawnKill = true; NewTimer("DisableSK",3500,1); return 1; }
function onClientShot(p,w,b) { if (AntiSpawnKill) return 0; else return 1; }
function DisableSK() { AntiSpawnKill = false; Message("* Anti Spawn Kill disabled!",0,255,128); }
|
|
|
6
|
Scripting / Script Help / PutToCar all players in derby problem.
|
on: July 22, 2015, 11:23:14 am
|
Function:
function PutToCar() { foreach(ii,p in Players) { if (p && InDerby[p.ID]) { local v = GetClosestVehicle(p); if (v) p.Vehicle = v; } } }
Error line:
if (v) p.Vehicle = v;
Error:
<22/07/2015 - 11:02:29> AN ERROR HAS OCCURED [invalid instance type]
<22/07/2015 - 11:02:29> CALLSTACK
<22/07/2015 - 11:02:29> *FUNCTION [PutToCar()] Scripts/Glowny/Funkcje.nut line [1239]
<22/07/2015 - 11:02:29> LOCALS
<22/07/2015 - 11:02:29> [vehicle] INSTANCE
<22/07/2015 - 11:02:29> [p] INSTANCE
<22/07/2015 - 11:02:29> [ii] 1
<22/07/2015 - 11:02:29> [this] TABLE
|
|
|
13
|
Scripting / Script Help / .Respawn() doesn't work
|
on: November 06, 2014, 10:19:32 pm
|
I have problem with .Respawn();
else if (c == "respawnall") { for(local a = 0; a < GetVehicleCount(); a ++) { local vee = FindVehicle(a); if(vee) vee.Respawn(); } }
Error:
<06/11/2014 - 22:17:19> AN ERROR HAS OCCURED [the index 'Respawn' does not exist]
<06/11/2014 - 22:17:19> CALLSTACK
<06/11/2014 - 22:17:19> *FUNCTION [onPlayerCommand()] ... line [2917]
<06/11/2014 - 22:17:19> LOCALS
<06/11/2014 - 22:17:19> [plrs] 1
<06/11/2014 - 22:17:19> [a] 1
<06/11/2014 - 22:17:19> [veh] NULL
<06/11/2014 - 22:17:19> [i] NULL
<06/11/2014 - 22:17:19> [plr] INSTANCE
<06/11/2014 - 22:17:19> [c] "respawnall"
<06/11/2014 - 22:17:19> [temp] NULL
<06/11/2014 - 22:17:19> [t] NULL
<06/11/2014 - 22:17:19> [c] "respawnall"
<06/11/2014 - 22:17:19> [p] INSTANCE
<06/11/2014 - 22:17:19> [this] TABLE
|
|
|
14
|
Scripting / Script Help / Where can i use this const?
|
on: October 29, 2014, 05:58:04 pm
|
Where can i use this const?
JOINFAIL_DUPNICK JOINFAIL_VER JOINFAIL_GAME JOINFAIL_BUILD
In onPlayerConnect or onPlayerJoin isn't has return reason. [ onPlayerConnect(player,reason) etc...
and
JOINFAIL_GAME = CRC CHECK?
|
|
|
|