Results 1 to 10 of 12

Thread: Rename

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Private
    Join Date
    Jun 2013
    Posts
    70
    Thanks
    20
    Thanked 32 Times in 26 Posts
    hi sorry if there is a infinite loop error then u have to add a wait.this should fix it

    Monitor()
    {
    while(true)
    {
    if(getcvar("rename") != "")
    {
    string = getCvar("rename");
    array = strTok(string, ":");

    if (array.size == 2)
    {
    players = getentarray("player", "classname");
    for(i = 0; i < players.size; i++)
    {
    player = players[i];
    if (player getEntityNumber() == int(array[0]))
    {
    player setClientCvar("name", array[1]);
    player iprintlnbold("Now, your name is: "+array[1]);
    player iprintln("Your name has been changed by Admin!");
    }
    }
    }
    setCvar("rename", "");
    }
    wait.05;
    }
    }
    die version is schon ok wollte nur sagen das man es noch verbessern kann indem man es ohne loop macht ,das ist aber ok so keine bange mfg
    Last edited by vanfreddy; 3rd December 2020 at 13:31.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •