27.10.2018, 17:24
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; }