15.03.2016, 16:45
Код:
if(!strcmp(cmd, "/remover", true)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COR_AMARELO, "Opзхes: (Tapete)"); SendClientMessage(playerid, COR_ERRO, "Uso vбlido: /Criar [Opзгo]"); return 1; } if(!strcmp(tmp, "tapete", true)) { if(pInfo[playerid][Prof] == POL_CIVIL || pInfo[playerid][Prof] == POL_MILITAR || pInfo[playerid][Prof] == POL_FEDERAL || aInfo[playerid][Admin] == 1) { if(pInfo[playerid][fardado] == 0 && aInfo[playerid][Admin] == 0) { SendClientMessage(playerid, COR_ERRO, "Vocк nгo estб fardado(a)!"); SendClientMessage(playerid, COR_ERRO, "Vocк precisa estб fardado(a) para usar este comando!"); return 1; } SendClientMessage(playerid, COR_AZULCLARO, "Tapete removido com sucesso!"); DeleteClosestStrip(playerid); } else if(!strcmp(tmp, "itens", true)) { if(!IsPlayerInDynamicCP(playerid, CP_5) && !IsPlayerInDynamicCP(playerid, CP_41) && !IsPlayerInDynamicCP(playerid, CP_42) && !IsPlayerInDynamicCP(playerid, CP_43) && !IsPlayerInDynamicCP(playerid, CP_44) && !IsPlayerInDynamicCP(playerid, CP_45)) { SendClientMessage(playerid, COR_ERRO, "Vocк nгo estб em uma loja de roupas!"); return 1; } RemovePlayerAttachedObject(playerid, 1); WE_SetInt(f(playerid), "useOculos", 0); RemovePlayerAttachedObject(playerid, 2); WE_SetInt(f(playerid), "useMascara", 0); RemovePlayerAttachedObject(playerid, 4); WE_SetInt(f(playerid), "useChapeu", 0); SetarItensPlayer(playerid); SendClientMessage(playerid, COR_AMARELO, "Todos seus itens foram removidos."); } } return 1; }
Apenas o /remover tapete.
Poderiam me ajudar com a correзгo e uma explicaзгo do que foi feito?