help bro
#5

command e.e bro

Код:
CMD:uniforme(playerid, params[])
{
	new texto[10];
	if(!sscanf(params,"s[10]",texto))
	{
		if(strcmp(texto,	"medico",	true) == 0)
		{
			if(PlayerInfo[playerid][jJob] == 1 || PlayerInfo[playerid][vipjob] == 1)
			{
				if(IsPlayerInRangeOfPoint(playerid,1.0,1159.4829,-1356.8820,-10.7922))
				{
					if(RopaMedi[playerid] == 0)
					{
					    switch(PlayerInfo[playerid][jSexo])
						{
							case 1:
							{
								SetPlayerSkin(playerid,276);
							}
							case 2:
							{
					    		RemovePlayerAttachedObject(playerid, 3);
					    		RemovePlayerAttachedObject(playerid, 4);
								SetPlayerSkin(playerid,308);
							}
						}
	     				RopaMedi[playerid] = 1;
						SendClientMessage(playerid,-1,"Te has colocado el uniforme correctamente.");
					}
					else if(RopaMedi[playerid] == 1)
					{
					    RemovePlayerAttachedObject(playerid, 3);
						RemovePlayerAttachedObject(playerid, 4);
						RopaMedi[playerid] = 0;
						SetPlayerSkin(playerid, PlayerInfo[playerid][jRopa]);
						SendClientMessage(playerid,-1,"Te has quitado el uniforme correctamente.");
					}
				}
				else return SendClientMessage(playerid,-1,"Necesitas el trabajo de mйdico para utilizar este comando");
			}
		}
		if(strcmp(texto,	"minero",	true) == 0)
		{
			if(PlayerInfo[playerid][jJob] == 11 || PlayerInfo[playerid][vipjob] == 11)
			{
				if(IsPlayerInRangeOfPoint(playerid,1.0,269.1445,295.4604,999.8400))
				{
					if(RopaMine[playerid] == 0)
					{
					    RopaMine[playerid] = 1;
						SendClientMessage(playerid,-1,"Te has colocado el uniforme correctamente");
           			    switch(PlayerInfo[playerid][jSexo])
						{
						    case 1:
							{
								SetPlayerSkin(playerid, 27);
							}
							case 2:
							{
							    RemovePlayerAttachedObject(playerid, 3);
								RemovePlayerAttachedObject(playerid, 4);
							    SetPlayerSkin(playerid, 131);
								SetPlayerAttachedObject(playerid,4,18638,2,0.136,0.018999,0.002999,-0.600001,-2.10002,-12.4,1,1,1.072);
							}
						}
					}
					else if(RopaMine[playerid] == 1)
					{
					    RemovePlayerAttachedObject(playerid, 3);
						RemovePlayerAttachedObject(playerid, 4);
						RopaMine[playerid] = 0;
						SetPlayerSkin(playerid, PlayerInfo[playerid][jRopa]);
						SendClientMessage(playerid,-1,"Te has quitado el uniforme correctamente.");
					}
				}
			}
			else return SendClientMessage(playerid,-1,"Necesitas el trabajo de minero para utilizar este comando");
		}
	}
    if(sscanf(params, "s[10]", texto))
	{
		if(PlayerInfo[playerid][jMiembro] != 1) return 1;
		if(!PlayerToPoint(2.0, playerid, 254.0884,73.6973,1003.6406)) return SendClientMessage(playerid, COLOR_WHITE, "No estбs en el lugar adecuado");
		if(PlayerInfo[playerid][pDuty] == 0)
		{
			switch(PlayerInfo[playerid][jSexo])
			{
				case 1:
				{
					SendClientMessage(playerid, COLOR_WHITE, "Te pusiste el uniforme de policнa");
					PlayerInfo[playerid][pDuty] = 1;
					SetPlayerSkin(playerid, PlayerInfo[playerid][pModelo]);
					SetPlayerColor(playerid,COLOR_POLICIA);
				}
				case 2:
				{
					SendClientMessage(playerid, COLOR_WHITE, "Te pusiste el uniforme de policнa");
					PlayerInfo[playerid][pDuty] = 1;
					SetPlayerSkin(playerid, 306);
					SetPlayerColor(playerid,COLOR_POLICIA);
				}
			}
		}
		else
		{
			SetPlayerColor(playerid,COLOR_WHITE);
			SendClientMessage(playerid, COLOR_WHITE, "Te sacaste el uniforme de policнa.");
			SetPlayerSkin(playerid, PlayerInfo[playerid][jRopa]);
			PlayerInfo[playerid][pDuty] = 0;
			QuitarArmas(playerid);
			ResetPlayerWeapons(playerid);
			DarArmas(playerid);
		}
 	}
	return 1;
}
Reply


Messages In This Thread
help bro - by Enriquedk - 27.10.2018, 12:30
Re: help bro - by Zeus666 - 27.10.2018, 12:36
Re: help bro - by Enriquedk - 27.10.2018, 12:46
Re: help bro - by Zeus666 - 27.10.2018, 16:33
Re: help bro - by Enriquedk - 27.10.2018, 17:24
Re: help bro - by ReD_HunTeR - 27.10.2018, 18:16
Re: help bro - by Zeus666 - 27.10.2018, 19:12
Re: help bro - by RogueDrifter - 27.10.2018, 19:19
Re: help bro - by GTLS - 28.10.2018, 06:32

Forum Jump:


Users browsing this thread: 2 Guest(s)