LOGO
Username Icons
100$
Username Effects
150$
Username Change
300$
Profile Cover
250$
Userbar Hue
100$
Change Username Color
1000$
Spotify listening status
150$
Arcade access
400$
Reputation power
500$
Warn Remover ( -1 )
5000$
Customize your MyBB profile with our shop’s options! Choose from username changes, colors, and profile covers and more others to enhance your forum identity.
Go to shop
CSGO.WTFCS.COM
Connect
CS.WTFCS.COM
Connect
XMAS.WTFCS.COM
Connect
PB.WTFCS.COM
Connect
DR.WTFCS.COM
Connect
WAR.WTFCS.COM
Connect
WAR1.WTFCS.COM
Connect
www.Game-State.com
SAMP
Connect
www.Game-State.com
MINECRAFT
Connect
Hello There, Guest!
If you encounter issues with quick login, use the link below for direct access.
Open Log In ( Directly page )
×
Register
Show Serverlist
ChatBox
345
/hostname
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#1
Autor: IosifR

Cu aceasta comanda puteti schimba numele serverului. Veti avea nevoie de zcmd si sscanf.

Code:
CMD:hostname(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >=6) // Daca nu aveti sistem de admin, in loc de asta puneti 'if(IsPlayerAdmin(playerid))'
    {
        new string[128], name[64]; // Aici creem un string pentru a trimite textele si 'name', adica numele care il scrie playerul care foloseste comanda.
        if(sscanf(params, "s[64]", name)) return SCM(playerid,COLOR_GREY, "Folosire: {FFFFFF}/hostname <Nume>"); // Aici ne folosim de sscanf. Daca adminul scrie doar /hostname i va trimite un mesaj cum se foloseste comanda
        {
            format(string, sizeof(string), "hostname %s", name);   In loc de '%s' va fii numele care a scris adminul.
            SendRconCommand(string); Aceasta linie trimite comanda catre consola serverului
            format(string, sizeof(string), "Ai schimbat numele serverului in %s", name);
            SendClientMessage(playerid,# COLOR_RED1, string);  // Trimite mesajul de mai sus ca a schimbat numele serverului
        }
    }
    else return SCM(playerid, COLOR_YELLOW2, AdminOnly);
    return 1;
}

La inceput de gamemode puneti:

Code:
#define AdminOnly "{FFFFCC}Eroare: Nu ai acces la aceasta comanda!"

#define COLOR_YELLOW2       0xFFFABAFF

#define COLOR_RED1          0x80404000

#define COLOR_GREY             0xAFAFAFAA

#define SCM SendClientMessage


Si

Code:
#include <zcmd>
#include <sscanf>
Mihai nu face flotari, el le cumpara gata facute!
Mihai s-a nascut intr-o cabana construita de el.
Mihai a omorat 50 de teroristi din 2 gloante.Primul a fost de avertizare.
Mihai poate sa isi faca poze cu telefonul fix.
Mihai a raspuns la un apel pierdut.
Singura femeie care si-a permis sa faca glume despre Mihai a fost Elodia, de aia nu mai este.
Cand Mihai iti arata degetul nu o face ca sa te injure... doar iti arata cate secunde mai ai de trait!
You are not allowed to view links. Register or Login to view.
You are not allowed to view links. Register or Login to view. You are not allowed to view links. Register or Login to view. 


Forum Jump:


Users browsing this thread: 1 Guest(s)