Jump to content
  • 0

Ajutor TCC


Issey

Question

Salut , am o problema cu o comanda , si deja ajung sa fac peri albi din cauza ei . Deci , am creeat factiunea Tow Car Company , si vreau ca atunci cand unul dintre mecanici este On Duty ( i-am creat comanda) sa se poata urca in masinile personale si sa dea park in sediul lor (am creat si comanda aceea) dar ideea este ca nu pot sa fac sa se urce in masinile personale incuiate , am incercat si cu SetVehicleParamsEx sau SetVehicleParamsForPlayer si tot nu am reusit , am incercat sa fac comanda si dupa comanda de On Duty de la admini ( daca vreun admin de rank >= 5 este on duty se poate urca in masinile incuiate ) dar nu inteleg dece nu merge 

 

Comanda :tduty

CMD:tduty(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
	    if(gPlayerLogged[playerid] == 0)
	    {
	        SendClientMessage(playerid, COLOR_GREY, "{ffffff}Ne pare rau, nu esti logat pentru a utiliza aceata comanda!");
			return 1;
	    }
	    if(IsPlayerInRangeOfPoint(playerid, 7.0, 1453.3018,-1768.4407,1815.9910))
	    {
	        if(OnTDuty[playerid] == 0)
	        {
	            new sendername[MAX_PLAYER_NAME], string[256];
	            OnTDuty[playerid] = 1;
				SetPlayerSkin(playerid, 50);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "* [T.C.C.] Mecanicul %s e la datorie acum. Nu ezitati sa sunati daca aveti nevoie de ajutor (/callservice -> TCC)!", sendername);
				ABroadCast(COLOR_RED2,string,1);
				if(IsATccMember(playerid))
				{
				    for(new i = 0; i < sizeof(CarInfo); i++)
					{
						SetVehicleParamsForPlayer(i,playerid,0,0);
					}
				}
				return 1;
	        }
	        else if(OnTDuty[playerid] == 1)
	        {
	            new sendername[MAX_PLAYER_NAME], string[256];
	            OnTDuty[playerid] = 0;
				SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "*  [T.C.C.] Mecanicul %s nu mai e la datorie acum. Acesta nu va mai primi apeluri de la voi!", sendername);
				ABroadCast(COLOR_RED2,string,1);
				return 1;
	        }
	    }
	    else
	    {
	        SendClientMessage(playerid, COLOR_RED, "doar cei din tcc");
	    }
	}
    return 1;
}

 si aceasta este comanda :aduty

CMD:aduty(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
	    if(gPlayerLogged[playerid] == 0)
	    {
	        SendClientMessage(playerid, COLOR_GREY, "{ffffff}Ne pare rau, nu esti logat pentru a utiliza aceata comanda!");
			return 1;
	    }
	    if(PlayerInfo[playerid][pAdmin] > 0)
	    {
	        if(AdminDuty[playerid] == 0)
	        {
	            new sendername[MAX_PLAYER_NAME], string[256];
	            AdminDuty[playerid] = 1;
	            SetPlayerArmourEx(playerid, 999);
				SetPlayerHealthEx(playerid, 999);
				SetPlayerSkin(playerid, 217);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "Notice: {FFFFFF}Admin %s is now on administrative duty.", sendername);
				ABroadCast(COLOR_RED2,string,1);
				if(PlayerInfo[playerid][pAdmin] >= 5)
				{
				    for(new i = 0; i < sizeof(CarInfo); i++)
					{
						SetVehicleParamsForPlayer(i,playerid,0,0);
					}
				}
				return 1;
	        }
	        else if(AdminDuty[playerid] == 1)
	        {
	            new sendername[MAX_PLAYER_NAME], string[256];
	            AdminDuty[playerid] = 0;
	            SetPlayerArmourEx(playerid, 0);
				SetPlayerHealthEx(playerid, 100);
				SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "Notice: {FFFFFF}Admin %s is now off administrative duty.", sendername);
				ABroadCast(COLOR_RED2,string,1);
				return 1;
	        }
	    }
	    else
	    {
	        SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
	    }
	}
    return 1;
}

Ma poate ajuta cineva va rog 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

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.