Jump to content
  • 0

Spawn special pentru administratori [Problema]


Dany_Diaz

Question

Problemă întâlnită (descriere): Deci am incercat sa fac un spawn pentru administratori si nu mi-a functionat.
Ero(area / rile) / warning-(ul / urile): Nu am erori doar ca nu functioneaza.
Liniile de cod / sursa / script-ul: -
Imagini / Video (optional): -
Aţi încercat să rezolvaţi singur?: Da, am avut numeroase incercari fara succes din pacate.

Incercarea 1.

}
if(PlayerLogged[playerid] == 0) return true;
if(PlayerInfo[playerid][pAdminDuty] == 0) 
if(PlayerInfo[playerid][pAdmin] <= 1 || AdminLogged[playerid] == false) return true;
{
    SetPlayerPos(playerid, 1495.5715,-1768.7667,107.1565)
    return 1;
}

Incercarea 2.

}
if(PlayerLogged[playerid] == 0) return true;
if(PlayerInfo[playerid][pAdminDuty] == 0) 
if(PlayerInfo[playerid][pAdmin] <= 1)
{
    SetPlayerPos(playerid, 1495.5715,-1768.7667,107.1565)
    return 1;
}

Incercarea 3.

}
if(PlayerLogged[playerid] == 0) return true;
if(PlayerInfo[playerid][pAdminDuty] == 0) 
{
    SetPlayerPos(playerid, 1495.5715,-1768.7667,107.1565)
    return 1;
}

Incercarea 4.

}
if(PlayerLogged[playerid] == 0) return true;
if(PlayerInfo[playerid][pAdmin] <= 1)
{
    SetPlayerPos(playerid, 1495.5715,-1768.7667,107.1565)
    return 1;
}

Daca puteti sa ma ajutati v-as fi recunoscator.

Multumesc pentru atentia acordata.

________________________________________________________________________________________________________________________

CMD:manele(playerid, params[])
{
    if(PlayerLogged[params[0]] == 0) return;
    SendClientMessage(playerid, COLOR_GREY, ""Ati primit kick. Motiv: Interzis manelistilor"");
    {
        Kick(params[0]);
	return 1;
    }
}


_______________________________________________________________________________________________________________________

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Poti incerca si asta:

 

if(PlayerInfo[playerid][pAdmin])
{
SetPlayerPos(playerid, 1495.5715,-1768.7667,107.1565)
return 1;
}

 

Daca variabila pAdmin este pozitiva, functia if va returna o valoarea true si functia se va executa. Daca valoarea este 0 se va returna false si functia nu se va executa.

 

Ramane la alegerea ta pe care dintre ele vrei sa o folosesti. Iti recomand sa o folosesti pe cea de mai sus pentru ca poti customiza acel spawn, daca adminul are niveul X, sau Y, etc.

Edited by Iulian

Rate me :)

Link to comment
Share on other sites

Pai unde puteam sa il pun, Woops nui evident in public OnPlayerSpawn;

________________________________________________________________________________________________________________________

CMD:manele(playerid, params[])
{
    if(PlayerLogged[params[0]] == 0) return;
    SendClientMessage(playerid, COLOR_GREY, ""Ati primit kick. Motiv: Interzis manelistilor"");
    {
        Kick(params[0]);
	return 1;
    }
}


_______________________________________________________________________________________________________________________

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Puteai sa pui si intr-o comanda. De asta te-am intrebat.

 

Mai ai si ceva sa te spawneze undeva daca esti intr-o factiune sau ceva?

 

Asta PlayerInfo[playerid][pAdmin] <= 1 nu trebuie sa fie PlayerInfo[playerid][pAdmin] >= 1?

Link to comment
Share on other sites

if(PlayerInfo[playerid][pAdmin] >= 1) // Admin cu grad egal cu 1 sau mai mare !
{
    SetPlayerPos(playerid, 1495.5715,-1768.7667,107.1565);
    return 1;
}
Edited by sRk7

"Mulţi programatori buni fac programare nu pentru că se aşteaptă să câştige bani sau să fie lăudaţi de public, ci pentru că e amuzant să programezi." - Linus Torvalds

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.