Jump to content

Acces comanda


FeVosFeR

Recommended Posts

Salut! Am comanda [/makeadmin]:

Spoiler

CMD:makeadmin(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(PinLogged[playerid] == 0) return SCM(playerid, COLOR_BLUELIGHT, "Trebuie sa introduci codul pin mai intai folosind comanda [/pin] sau sa setezi unul folosind comanda [/setpin].");
    if(IsPlayerConnected(playerid))
    {
         if(PlayerInfo[playerid][pAdmin] >= 7 || EstiFondator(playerid))
        {

Cum as putea ca, aceasta comanda sa fie utilizata de jucatorul cu numele 'Xilescu'?

Link to comment
Share on other sites

Cauta public-ul EstiFondator in gamemode, sterge-l pentru a evita o eventuala greseala si inlocuieste-l cu acesta.

public EstiFondator(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		new nume[512];
        GetPlayerName(playerid, nume, sizeof(nume));
        if((strcmp(nume, "Xilescu", true) == 0))
        {
		    return 1;
		}
	}
	return 0;
}

 

Edited by Flaviu11
Link to comment
Share on other sites

46 minutes ago, Flaviu11 said:

Cauta public-ul EstiFondator in gamemode, sterge-l pentru a evita o eventuala greseala si inlocuieste-l cu acesta.


public EstiFondator(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		new nume[512];
        GetPlayerName(playerid, nume, sizeof(nume));
        if((strcmp(nume, "Xilescu", true) == 0))
        {
		    return 1;
		}
	}
	return 0;
}

 

Pe langa EstiFondator si Admin 7 sa fie Xilescu. Ceva cu strid parca sau user.

Link to comment
Share on other sites

La 16.03.2019 la 14:10, FeVosFeR a spus:

Pe langa EstiFondator si Admin 7 sa fie Xilescu. Ceva cu strid parca sau user.

daca ai acel nume, nu este necesar sa ai admin ca sa poti folosi comanda /makeadmin. De exemplu acum te-ai inregistrat cu acel nume si nu ai admin, poti folosi /makeadmin daca numele setat de tine in publicul EstiFondator

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.