Jump to content

Problema - fs - fly


mateiualex
 Share

Recommended Posts

Poftim comanda fly:

CMD:fly(playerid, params[])
{
	if(playerVariables[playerid][pAdminLevel] >= 1)
	{
		if(playerVariables[playerid][pWarrants] == 0)
		{
			if(AFK[playerid] == 0)
			{
				if(playerVariables[playerid][pPrisonTime] == 0)
				{
					if(groupVariables[playerVariables[playerid][pGroup]][gInWar] == 0)
            		{
			   			StartFly(playerid);
			   			SetPlayerHealth(playerid, 9999999999999999999999999999999999.0);
			   		}

					else SendClientMessage(playerid, COLOR_GREY, "You can't use this command in war time.");
			    }
			    else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are sleeping.");
			}
			else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are in jail.");
		}
		else SendClientMessage(playerid, COLOR_GREY, "You are wanted, you can't spectante anyone.");
	}
	return 1;
}

CMD:stopfly(playerid, params[])
{
	if(playerVariables[playerid][pAdminLevel] >= 1)
	{
	    StopFly(playerid);
	    SetPlayerHealth(playerid, 100.0);
	}
	return 1;
}

adauga in gm.

  • Upvote 1
Link to comment
Share on other sites

Poftim comanda fly:

CMD:fly(playerid, params[])
{
	if(playerVariables[playerid][pAdminLevel] >= 1)
	{
		if(playerVariables[playerid][pWarrants] == 0)
		{
			if(AFK[playerid] == 0)
			{
				if(playerVariables[playerid][pPrisonTime] == 0)
				{
					if(groupVariables[playerVariables[playerid][pGroup]][gInWar] == 0)
            		{
			   			StartFly(playerid);
			   			SetPlayerHealth(playerid, 9999999999999999999999999999999999.0);
			   		}

					else SendClientMessage(playerid, COLOR_GREY, "You can't use this command in war time.");
			    }
			    else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are sleeping.");
			}
			else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are in jail.");
		}
		else SendClientMessage(playerid, COLOR_GREY, "You are wanted, you can't spectante anyone.");
	}
	return 1;
}

CMD:stopfly(playerid, params[])
{
	if(playerVariables[playerid][pAdminLevel] >= 1)
	{
	    StopFly(playerid);
	    SetPlayerHealth(playerid, 100.0);
	}
	return 1;
}

adauga in gm.

Te-ai gandit ca el are alte variabile? Nu? Esti un adevarat scripter, lasa-te.

Link to comment
Share on other sites

Poftim comanda fly:

CMD:fly(playerid, params[])
{
	if(playerVariables[playerid][pAdminLevel] >= 1)
	{
		if(playerVariables[playerid][pWarrants] == 0)
		{
			if(AFK[playerid] == 0)
			{
				if(playerVariables[playerid][pPrisonTime] == 0)
				{
					if(groupVariables[playerVariables[playerid][pGroup]][gInWar] == 0)
            		{
			   			StartFly(playerid);
			   			SetPlayerHealth(playerid, 9999999999999999999999999999999999.0);
			   		}

					else SendClientMessage(playerid, COLOR_GREY, "You can't use this command in war time.");
			    }
			    else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are sleeping.");
			}
			else SendClientMessage(playerid, COLOR_GREY, "You can't spectate because you are in jail.");
		}
		else SendClientMessage(playerid, COLOR_GREY, "You are wanted, you can't spectante anyone.");
	}
	return 1;
}

CMD:stopfly(playerid, params[])
{
	if(playerVariables[playerid][pAdminLevel] >= 1)
	{
	    StopFly(playerid);
	    SetPlayerHealth(playerid, 100.0);
	}
	return 1;
}

adauga in gm.

 

Am modificat ceea ce mi-ai dat tu dupa variabilele mele, oricum varianta ta este foarte complexa. Eu m-am apcuat de un GM de la 0. La mine arata cam asa cod-ul

CMD:fly(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
     {
          StartFly(playerid);
          SendClientMessage(playerid, COLOR_GREEN, "SERVER: Flying system ON!");
          SetPlayerHealth(playerid, 9999999999999999999999999999999999.0);
          SetPlayerArmour(playerid, 9999999999999999999999999999999999.0);
     }
 
    }
    else
    {
       SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
    }
return 1;
}
 
CMD:stopfly(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        StopFly(playerid);
        SendClientMessage(playerid, COLOR_GREEN, "SERVER: Flying system OFF!");
        SetPlayerHealth(playerid, 100.0);
        SetPlayerArmour(playerid, 0);
    }
    else
    {
       SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
    }
return 1;
}

Te-ai gandit ca el are alte variabile? Nu? Esti un adevarat scripter, lasa-te.

Am modificat eu. Ceea ce nu stiam este cum pun restrictia la admin, eu incercam sa o pun in fs, dar am uitat cu totul de include si ca pot face legatura cu Startfly / Stopfly definind <fly>. Am rezolvat acum :D. Sunt la inceput oricum si incerc sa invat pe parcurs alaturi de un prieten. 

Edited by Netistul
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. 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.