Jump to content
  • 0

Problema skin in stanga jos.


aWm99

Question

Problema intalnita (descriere):Salut am facut si eu un textdraw cu skin in stanga jos dar cand tastez comanda /aduty nu se actoalizeaza skin-ul.
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):

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]);
                PlayerTextDrawSetPreviewModel(playerid, SkinPreview[playerid], PlayerInfo[playerid][pModel]);
	            PlayerTextDrawShow(playerid, SkinPreview[playerid]);
				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;

}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?:Da dar nu am reusit.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
12 minutes ago, aWm99 said:

Problema intalnita (descriere):Salut am facut si eu un textdraw cu skin in stanga jos dar cand tastez comanda /aduty nu se actoalizeaza skin-ul.
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):

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]);
                PlayerTextDrawSetPreviewModel(playerid, SkinPreview[playerid], PlayerInfo[playerid][pModel]);
	            PlayerTextDrawShow(playerid, SkinPreview[playerid]);
				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;

}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?:Da dar nu am reusit.

După SetPlayerSkin încearcă să folosești GetPlayerSkin si apoi setează.

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • 0
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);
                GetPlayerSkin(playerid);
				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]);
                PlayerTextDrawSetPreviewModel(playerid, SkinPreview[playerid], PlayerInfo[playerid][pModel]);
	            PlayerTextDrawShow(playerid, SkinPreview[playerid]);
				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;

}

Asa e bine?

 

Link to comment
Share on other sites

  • 0
16 minutes ago, aWm99 said:
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);
                GetPlayerSkin(playerid);
				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]);
                PlayerTextDrawSetPreviewModel(playerid, SkinPreview[playerid], PlayerInfo[playerid][pModel]);
	            PlayerTextDrawShow(playerid, SkinPreview[playerid]);
				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;

}

Asa e bine?

 

....cum sa fie bine așa?, Ai folosit degeaba funcția așa..

 

PlayerTextDrawSetPreviewModel(playerid, SkinPreview[playerid], GetPlayerSkin(playerid));

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • 0

Tot nu merge am pus asa:

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);
                PlayerTextDrawSetPreviewModel(playerid, SkinPreview[playerid], GetPlayerSkin(playerid));
				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]);
                PlayerTextDrawSetPreviewModel(playerid, SkinPreview[playerid], PlayerInfo[playerid][pModel]);
	            PlayerTextDrawShow(playerid, SkinPreview[playerid]);
				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;

}

 

Link to comment
Share on other sites

  • 0

Incearca ce-ti dau eu mai jos:

CMD:aduty(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0)
        return SendClientMessage(playerid, COLOR_GREY, "{ffffff}Ne pare rau, nu esti logat pentru a utiliza aceata comanda!");

    if(PlayerInfo[playerid][pAdmin] == 0)
    	return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);

    switch( AdminDuty[playerid] )
    {
    	case 0:
    	{
	        new sendername[MAX_PLAYER_NAME], string[256];
	        AdminDuty[playerid] = 1;
	        SetPlayerArmourEx(playerid, 999);
			SetPlayerHealthEx(playerid, 999);
			SetPlayerSkin(playerid, 217);
	        PlayerTextDrawSetPreviewModel(playerid, SkinPreview[playerid], GetPlayerSkin(playerid));
	        PlayerTextDrawShow(playerid, SkinPreview[playerid]);
			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);
    	}
    	case 1:
    	{
	    	new sendername[MAX_PLAYER_NAME], string[256];
	        AdminDuty[playerid] = 0;
	        SetPlayerArmourEx(playerid, 0);
			SetPlayerHealthEx(playerid, 100);
			SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
	        PlayerTextDrawSetPreviewModel(playerid, SkinPreview[playerid], PlayerInfo[playerid][pModel]);
	        PlayerTextDrawShow(playerid, SkinPreview[playerid]);
			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;
}

 

Sinner.png

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.