cvar



> > >

28 days ago
1n1t1at1ve - Ram!s France
Send PM
Hi all,

i try to create cvar my objective is make command for move player, if anyone can help me thanks.

cod:

"moveplayer()
{
self endon("boot");

setcvar("g_moveplayer", "");
while(1)
{
if(getcvar("g_moveplayer") != "")
{
specPlayerNum = getcvarint("g_moveplayer");
for(i = 0; i < level.awe_allplayers.size; i++)
{
if(isdefined(level.awe_allplayers))
{
thisPlayerNum = level.awe_allplayers getEntityNumber();
if(thisPlayerNum == spawnPlayerNum)
{
level.awe_allplayers.pers["team"] = "spawn";
level.awe_allplayers.sessionteam = "spawn";
level.awe_allplayers setClientCvar("g_scriptMainMenu", game["_spawnlogic"]);

level.awe_allplayers iprintlnbold("you have been moved by ^1Admin");


}
}
}
level.awe_allplayers iprintlnbold("you have been moved by ^1Admin");


setcvar("g_moveplayer", "");
}
wait 0.05;
}
}"
Please sign in or create an account to post an answer.