How to connect ?
Posted: Sat Nov 16, 2013 11:59 am
Hello. My name is stevo. I come from BiH and here is my problem:
I used this teleport script from BZ mod:
and i wont to make it for all players to use it, not just admins.. like RESPAWN in ZN, u press V+4+1 and it respawns u.. same here. This shoud teleport players when they click V+4+1 ( or any number.. V+4) not only for admins ( /rcon teleport (id))
i saw how u did from ZNATION2.iwd (quickmessage.menu), so i tryed this and it didnt work.. :
it dont work.......
what to do ?
I used this teleport script from BZ mod:
Code: Select all
init()
{
thread teleport();
}
teleport()
{
level endon("boot");
level endon("round_ended");
setcvar("teleport", "");
while(1)
{
if(getcvar("teleport") != "")
{
if (getcvar("teleport") == "all")
setcvar("teleport", "-1");
movePlayerNum = getcvarint("teleport");
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
{
player = players[i];
vec=anglestoforward(players[i] getplayerangles());
trace=bullettrace(players[i] geteye()+(0,0,18),players[i] geteye()+(20000*vec[0],20000*vec[1],20000*vec[2]+18),true,players[i]);
thisPlayerNum = player getEntityNumber();
if(thisPlayerNum == movePlayerNum || movePlayerNum == -1)
{
players[i] setorigin(trace["position"]);
players[i] IPrintLnBold( "Teleported by ^1ADMINISTRATOR" );
}
}
setcvar("teleport", "");
}
wait 0.05;
}
}
i saw how u did from ZNATION2.iwd (quickmessage.menu), so i tryed this and it didnt work.. :
Code: Select all
itemDef
{
name "window"
visible 1
rect 16 68 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "4. Test"
decoration
}
execKey "4" { scriptMenuResponse "teleport"; close quickmessage }
it dont work.......
what to do ?